// 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()); } }