I am trying to implement a JTable on a Java GUI that can fill itself with values from a file and allow the user to make modifications to various cells. Since I'm using the GUI editor in the Netbeans IDE, my first instinct was to add the JTable to my form from the palette. however, I quickly realized that I couldn't add more than 100 rows to the table (for my application i'd need around 500+). additionally, while searching for a solution to this problem, I noticed a lot of people saying to use a Custom TableModel instead of using the JTable because it is more robust/efficient.
first, is there a way to add more than 100 rows to a JTable? secondly, is using the JTable (which uses the DefaultTableModel) really a bad implementation? my form is pretty complex, so I would prefer to use the GUI editor to adjust the size, position, etc. of my JTable as opposed to hard-coding it.
解决方案is there a way to add more than 100 rows to a JTable?
Why is 100 a limit? That sounds like your IDE, not the DefaultTableModel. Tens of thousands of rows is no problem for the DefaultTableModel (not that any user would want to look at all that data).