Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JTable inside JTable - performance issues

843807Apr 19 2010 — edited Apr 23 2010
Hi,
I am rendering some of the cells in my main JTable with another JTable ( table with single row and multiple columns) , but it seems to degrade the performance of the complete Table. It repaints the complete table in a infinite loop.

Does any one know how to avoid this repainting?


I see the following explanation in DefaultTableCellRenderer class,
As the renderer is only parented for the lifetime of a painting operation we similarly want to avoid the overhead associated with walking the hierarchy for painting operations. So this class overrides the validate, invalidate, revalidate, repaint, and firePropertyChange methods to be no-ops and override the isOpaque method solely to improve performance. If you write your own renderer, please keep this performance consideration in mind.


can some one please tell me what this actually means when I write my own TableCellRenderer which extends JTable?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 21 2010
Added on Apr 19 2010
7 comments
243 views