该表仅显示3083行,而在mysql中则更多!
DefaultTableModel modelEtud = new DefaultTableModel(null, new String[]{"N°", "C.I.N. / N° inscription", "Nom Fr", "Prenon Fr", "Matière", "Nombre Absences", "Groupe"}) {
};
String requetEtud = "SELECT * FROM etudiant2sga WHERE id = '" + resultatAbs.getString("idEtudiant") + "' AND idGroupe = '" + idGroupe + "' LIMIT 0 , 10000";
try {
ResultSet resultat = stmtSelectEtudiant.executeQuery(requetEtud);
while (resultat.next()) {
modelEtud.addRow(new Object[]{N, resultat.getString("id"), resultat.getString("nomFr"), resultat.getString("prenomFr"), EE, new SimpleDateFormat("dd-MM-yyyy").format(resultatAbs.getDate("dateAbs")), "séance " + resultatAbs.getInt("seance"), jTableGpr.getValueAt(row, 2)});
}
}
即使使用此代码也无法解决问题:
modelEtud.setRowCount(10000);