// End of variables declaration//GEN-END:variables public void VerDatos() throws ClassNotFoundException, SQLException { try { int nf = jTable1.getRowCount(); for (int i = 0; i < nf; i++) { dtm.removeRow(0); } String nivel = cbxniveles.getSelectedItem().toString(); StringTokenizer guion = new StringTokenizer(nivel, "-"); int idnivel = Integer.parseInt(guion.nextToken().toString()); for (ListaMatricula a : ADNMatricula.ListaMatriculas(idnivel)) { dtm.addRow(a.DatostoArray()); } } catch (Exception e) { JOptionPane.showMessageDialog(rootPane, e.toString()); } }
private void btneliminarActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btneliminarActionPerformed try { Matricula mat = new Matricula(); mat.setIdmatricula(FIMatricula.idalu); boolean elim = ADNMatricula.Eliminar(mat); if (elim) { JOptionPane.showMessageDialog(rootPane, "Registro eliminado"); HabilitarBotones(true, false, false, true); VerDatos(); } } catch (Exception e) { JOptionPane.showMessageDialog(rootPane, e.toString()); } } // GEN-LAST:event_btneliminarActionPerformed