My JComponent patch from some hours ago was not quite correct. I added
some fixlets that should make Swing work again as before.

2005-09-22  Roman Kennke  <[EMAIL PROTECTED]>

        * javax/swing/JComponent.java
        (paintChildren): If a child component is invisible, skip it.
        Handle the (rare) case when no clip is set as if it's set to the
        child component's bounds. These fixes should make Swing working
        again as before.

/Roman
Index: javax/swing/JComponent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JComponent.java,v
retrieving revision 1.58
diff -u -r1.58 JComponent.java
--- javax/swing/JComponent.java	22 Sep 2005 14:08:01 -0000	1.58
+++ javax/swing/JComponent.java	22 Sep 2005 20:56:01 -0000
@@ -1492,8 +1492,14 @@
     Component[] children = getComponents();
     for (int i = children.length - 1; i >= 0; --i)
       {
+        if (!children[i].isVisible())
+          continue;
+
         Rectangle bounds = children[i].getBounds();
         Rectangle oldClip = g.getClipBounds();
+        if (oldClip == null)
+          oldClip = bounds;
+
         Rectangle clip = oldClip.intersection(bounds);
         if (clip.isEmpty())
           continue;
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to