aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable" Watch "JTable" New topic
Author

JTable

Don Lyman
Greenhorn

Joined: Jan 05, 1999
Posts: 2
Seems to me JTable is still a dog when you have a large number of rows even in Java 2. Does this jive with your experience?
Gary Fidler
Greenhorn

Joined: Feb 12, 1999
Posts: 4
I assume you mean a dog when adding many rows to the table. Try this: (sorry I don't have my code example handy)
Instead of adding rows one at a time to the JTable using new Vectors, add new String[] to the underlying data model and then notify the JTable that its data has changed. MUCH faster!
Jim McCabe
Greenhorn

Joined: Mar 24, 1999
Posts: 8
I don't think it's the JTable itself but the default table model. Try making your own model. As a test, a couple months ago, I wrote a table model that had 100,000 rows and the JTable didn't slow down at all.
Don Lyman
Greenhorn

Joined: Jan 05, 1999
Posts: 2
Thanks for the suggestions.
 
Consider Paul's rocket mass heater.
 
subject: JTable