Hi again, > > I think, the blitting is broken again, because width=450,height=426 > > means that the whole table should be repainted.
Another part of the problem is the following stacktrace that I get when intercepting repaint() in JTable (below). You can see that the painting of the cells goes into CellRendererPane.paintComponent() which must call setBounds(), which in turn calls repaint() somewhere which ends up repainting the whole table. Stupid. This was caused by me making the CellRendererPane a child of JTable, as it is in Sun. The mistake here is to have the CellRendererPane set to visible. The attached patch fixes this (the CellRendererPane is invisible in Sun's impl too) and blitting is smooth again. 2006-05-18 Roman Kennke <[EMAIL PROTECTED]> * javax/swing/CellRendererPane.java (CellRendererPane): Set CellRendererPane to invisible. java.lang.Throwable at java.lang.Thread.dumpStack(Thread.java:487) at javax.swing.JTable.repaint(JTable.java:3980) at gn#u.java.awt.peer.GLightweightPeer.repaint(GLightweightPeer.java:237) at java.awt.Component.repaint(Component.java:1942) at java.awt.Component.reshape(Component.java:1415) at javax.swing.JComponent.reshape(JComponent.java:3456) at java.awt.Component.setBounds(Component.java:1372) at javax.swing.CellRendererPane.paintComponent(CellRendererPane.java:180) at javax.swing.CellRendererPane.paintComponent(CellRendererPane.java:219) at javax.swing.CellRendererPane.paintComponent(CellRendererPane.java:237) at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:1224) at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1281) at javax.swing.plaf.ComponentUI.update(ComponentUI.java:193) at javax.swing.JComponent.paintComponent(JComponent.java:2079) at javax.swing.JComponent.paint(JComponent.java:1756) at javax.swing.JViewport.paintSimple(JViewport.java:819) .. -- “Improvement makes straight roads, but the crooked roads, without Improvement, are roads of Genius.” - William Blake
Index: javax/swing/CellRendererPane.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/CellRendererPane.java,v retrieving revision 1.14 diff -u -1 -0 -r1.14 CellRendererPane.java --- javax/swing/CellRendererPane.java 3 Mar 2006 13:20:04 -0000 1.14 +++ javax/swing/CellRendererPane.java 18 May 2006 15:19:50 -0000 @@ -86,21 +86,21 @@ /** * accessibleContext */ protected AccessibleContext accessibleContext = null; /** * Constructs a new CellRendererPane. */ public CellRendererPane() { - // Nothing to do here. + setVisible(false); } /** * Should not be called. * * @param graphics not used here */ public void update(Graphics graphics) { //Nothing to do here.
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil