Title: RE: Doubt in Jtable Data

JTable uses the GOF "Flyweight" pattern for painting.
There are a small number of TableCellRenderers that do the actual painting work for each cell.
Usually, one per column (or datatype).

Bottom line, The table doesn't really hold _any_ data. 
All the data is in your TableModel.
So scalability then becomes an issue of your TableModel and especially
the speed of the getValueAt method.

Some best practices are:

* Use JDK 1.4 ;->
* Profile your app ;->
* Implement your own TableModel adapter over your own data rather than using DefaultTableModel.
* Try to have the getValueAt method use no synchronization (so using Vectors is bad choice)
* Then ensure a solid data structure that holds your expected local data size well
* If you have a _really_ large data set your TableModel could page data into in-memory chunks
  but this tends to be a bad UI design.  Who wants to scroll through gazillions of rows? 
  Instead, provide a filtering/selection mechanism.  JMO

Also,

- There was a new article on The Swing Connection about
  High Performance Frequenctly-Updated JTables
- Check Google for things like "Swing Performance JTable"

HTH

~rmp
Ralph M. Prescott
Technical Lead / Solutions Development
Xelus, Inc.

web:   http://www.xelus.com
email: [EMAIL PROTECTED]
vmail: 585.419.3137
im:     rmprescott@yahoo 

-----Original Message-----
From: Attili Venkata Ravi Kishore [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 6:23 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; Attili Venkata Ravi Kishore
Subject: Doubt in Jtable Data



Hi,

I have one data.  At client side, by using Jtable how many rows can I
show at a time.  If I am having huge number of rows, is it going to
effect the performance/memory related problems.

Any help in this is highly appreciated.

Thanks
Ravi

Reply via email to