How do I INSERT into SQL Server from Netbeans?

Im trying to insert some values into SQL Server from Netbeans but is not working, I also have some select's and they are working fine but the insert is not. I'm using three layer architecture, this is my GUI class:

  admin.getConexion();
    p.asignarNotas(Integer.parseInt(jtxtMateria.getText()), Integer.parseInt(jtxtIdAlumno.getText()), jtxtNota.toString(), jtxtTrimestre.toString());

My BL class is:

public void asignarNotas(int materia, int alumno, String nota, String trimestre) {
    try {
        PreparedStatement consulta;
        consulta = this.cn.getConexion().prepareStatement("INSERT INTO [dbo].[Notas] VALUES (?,?,?,?)");
        consulta.setInt(1, materia);
        consulta.setInt(2, alumno);
        consulta.setString(3, nota);
        consulta.setString(4, trimestre);
        consulta.executeUpdate();
    }catch(Exception e) {

    }
}