JTable inside JTable - performance issues
843807Apr 19 2010 — edited Apr 23 2010Hi,
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?