Hi,
I put the paint() call in paintDoubleBuffered() inside a try-finally
block so that the flags are correctly cleaned up when an exception is
thrown in paint().
2005-11-15 Roman Kennke <[EMAIL PROTECTED]>
* javax/swing/JComponent.java
(paintDoubleBuffered): Put paint() call inside a try-finally
block to correctly recover the double-buffering flag when
an exception is thrown inside the paint() call.
/Roman
Index: javax/swing/JComponent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JComponent.java,v
retrieving revision 1.85
diff -u -r1.85 JComponent.java
--- javax/swing/JComponent.java 15 Nov 2005 21:49:32 -0000 1.85
+++ javax/swing/JComponent.java 15 Nov 2005 23:05:37 -0000
@@ -1918,9 +1918,15 @@
g2 = getComponentGraphics(g2);
g2.setClip(r.x, r.y, r.width, r.height);
isPaintingDoubleBuffered = true;
- paint(g2);
- isPaintingDoubleBuffered = false;
- g2.dispose();
+ try
+ {
+ paint(g2);
+ }
+ finally
+ {
+ isPaintingDoubleBuffered = false;
+ g2.dispose();
+ }
// Paint the buffer contents on screen.
g.drawImage(buffer, 0, 0, this);
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches