Paul Clapham wrote:You're creating a 1000 x 1000 array but only using 4 of the 1000 columns. Were you going to add code to use the rest later? Because a table with 1000 columns isn't really a good candidate for a JTable.
Paul Clapham wrote:So that wasn't a mistake? You really do plan to have a square table? Your existing code looks like you plan to have 1000 rows but only 4 (or maybe 7) columns.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Spoor wrote:1000 rows is nothing for several applications, including but not limited to database editing / browsing applications.
Wendy Gibbons wrote:a table with 1000 rows in is a pretty bad UI (in my opnion). I would stick a filter on it, so the user can actually see data that is relevant to them.
Tim Jones wrote:
Rob Spoor wrote:1000 rows is nothing for several applications, including but not limited to database editing / browsing applications.
And your point is?
Tim Jones wrote:
Wendy Gibbons wrote:a table with 1000 rows in is a pretty bad UI (in my opnion). I would stick a filter on it, so the user can actually see data that is relevant to them.
Not sure how that will be possible inside a JTable (DefaultTableModel will only take Object[][)]?
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Spoor wrote:
Perhaps you can create your own AbstractTableModel subclass that does not copy data, but instead uses the original data source with its getRowCount, getValueAt and setValueAt methods.
Tim Jones wrote:just so it is clear, there are 7 columns in total with give or take 1000+ rows (values).
Paul Clapham wrote:
Tim Jones wrote:just so it is clear, there are 7 columns in total with give or take 1000+ rows (values).
Thanks for the clarification. So my suggestion would be to change your array declaration
so that it only has 7 columns instead of give or take 1000 columns.
Wendy Gibbons wrote:I stand by my comment, what is any user going to do with 1000 rows of data? all they are going to be doing is searching for the rows which are actually relevant to them, or trying to work out summaries.
it may be physically possible with a new table model, but i would be willing to bet it will still run like a dog.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |