diff options
Diffstat (limited to 'libjava/java/awt/Component.java')
-rw-r--r-- | libjava/java/awt/Component.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libjava/java/awt/Component.java b/libjava/java/awt/Component.java index 9c93bd0..94b74a6 100644 --- a/libjava/java/awt/Component.java +++ b/libjava/java/awt/Component.java @@ -869,9 +869,14 @@ public abstract class Component */ public void show() { + // We must set visible before showing the peer. Otherwise the + // peer could post paint events before visible is true, in which + // case lightweight components are not initially painted -- + // Container.paint first calls isShowing () before painting itself + // and its children. + this.visible = true; if (peer != null) peer.setVisible(true); - this.visible = true; } /** |