Lillian recently fixed Component.addImpl to not call repaint(). This is
correct in AWT, there the applications are expected to take care of this
themselves. However for Swing this means we need to add a repaint()
calls ot the JLayeredPane.addImpl(), so that components show up
correctly when beeing added to a JLayeredPane.

2006-03-28  Roman Kennke  <[EMAIL PROTECTED]>

        * javax/swing/JLayeredPane.java
        (addImpl): Repaint added component.

/Roman

-- 
“Improvement makes straight roads, but the crooked roads, without
Improvement, are roads of Genius.” - William Blake
Index: javax/swing/JLayeredPane.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JLayeredPane.java,v
retrieving revision 1.44
diff -u -1 -0 -r1.44 JLayeredPane.java
--- javax/swing/JLayeredPane.java	14 Feb 2006 11:16:45 -0000	1.44
+++ javax/swing/JLayeredPane.java	28 Mar 2006 21:45:57 -0000
@@ -592,20 +592,21 @@
   {
     int layer;
     if (layerConstraint != null && layerConstraint instanceof Integer)
       layer = ((Integer) layerConstraint).intValue();
     else
 	  layer = getLayer(comp);
 
     int newIdx = insertIndexForLayer(layer, index);
     setLayer(comp, layer);
     super.addImpl(comp, layerConstraint, newIdx);
+    repaint(comp.getX(), comp.getY(), comp.getWidth(), comp.getHeight());
   }
 
   /**
    * Sets the layer property for a JComponent.
    *
    * @param component the component for which to set the layer
    * @param layer the layer property to set
    */
   public static void putLayer(JComponent component, int layer)
   {

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Reply via email to