JTable has size limitations?












0















the table only displays 3083 line while in mysql are more than that !

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

even with this code the problem is not solved:



modelEtud.setRowCount(10000);









share|improve this question

























  • how long is the array you pass to the table model? How do you load the table?

    – jhamon
    Nov 15 '18 at 14:50













  • The problem is with your code not the table. The setRowCount() method won' t do anything. It just adds rows of empty data. You still need to read the data from your database to populate the model. See the Table From Database Example found in the Get The Code section for a generic working example to get you started.

    – camickr
    Nov 15 '18 at 16:01













  • please see new code(edit)

    – Mehdi Dellegi
    Nov 15 '18 at 18:33
















0















the table only displays 3083 line while in mysql are more than that !

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

even with this code the problem is not solved:



modelEtud.setRowCount(10000);









share|improve this question

























  • how long is the array you pass to the table model? How do you load the table?

    – jhamon
    Nov 15 '18 at 14:50













  • The problem is with your code not the table. The setRowCount() method won' t do anything. It just adds rows of empty data. You still need to read the data from your database to populate the model. See the Table From Database Example found in the Get The Code section for a generic working example to get you started.

    – camickr
    Nov 15 '18 at 16:01













  • please see new code(edit)

    – Mehdi Dellegi
    Nov 15 '18 at 18:33














0












0








0








the table only displays 3083 line while in mysql are more than that !

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

even with this code the problem is not solved:



modelEtud.setRowCount(10000);









share|improve this question
















the table only displays 3083 line while in mysql are more than that !

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

even with this code the problem is not solved:



modelEtud.setRowCount(10000);






java swing defaulttablemodel






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 15 '18 at 18:29







Mehdi Dellegi

















asked Nov 15 '18 at 14:05









Mehdi DellegiMehdi Dellegi

336




336













  • how long is the array you pass to the table model? How do you load the table?

    – jhamon
    Nov 15 '18 at 14:50













  • The problem is with your code not the table. The setRowCount() method won' t do anything. It just adds rows of empty data. You still need to read the data from your database to populate the model. See the Table From Database Example found in the Get The Code section for a generic working example to get you started.

    – camickr
    Nov 15 '18 at 16:01













  • please see new code(edit)

    – Mehdi Dellegi
    Nov 15 '18 at 18:33



















  • how long is the array you pass to the table model? How do you load the table?

    – jhamon
    Nov 15 '18 at 14:50













  • The problem is with your code not the table. The setRowCount() method won' t do anything. It just adds rows of empty data. You still need to read the data from your database to populate the model. See the Table From Database Example found in the Get The Code section for a generic working example to get you started.

    – camickr
    Nov 15 '18 at 16:01













  • please see new code(edit)

    – Mehdi Dellegi
    Nov 15 '18 at 18:33

















how long is the array you pass to the table model? How do you load the table?

– jhamon
Nov 15 '18 at 14:50







how long is the array you pass to the table model? How do you load the table?

– jhamon
Nov 15 '18 at 14:50















The problem is with your code not the table. The setRowCount() method won' t do anything. It just adds rows of empty data. You still need to read the data from your database to populate the model. See the Table From Database Example found in the Get The Code section for a generic working example to get you started.

– camickr
Nov 15 '18 at 16:01







The problem is with your code not the table. The setRowCount() method won' t do anything. It just adds rows of empty data. You still need to read the data from your database to populate the model. See the Table From Database Example found in the Get The Code section for a generic working example to get you started.

– camickr
Nov 15 '18 at 16:01















please see new code(edit)

– Mehdi Dellegi
Nov 15 '18 at 18:33





please see new code(edit)

– Mehdi Dellegi
Nov 15 '18 at 18:33












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53321236%2fjtable-has-size-limitations%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53321236%2fjtable-has-size-limitations%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Xamarin.iOS Cant Deploy on Iphone

Glorious Revolution

Dulmage-Mendelsohn matrix decomposition in Python