From 75ef0594a381f1760140e568d08e80fd685274e6 Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Thu, 22 Jan 2004 00:22:27 +0000 Subject: Component.java (show): Set visible to true before showing the peer. 2004-01-21 Thomas Fitzsimmons * java/awt/Component.java (show): Set visible to true before showing the peer. From-SVN: r76325 --- libjava/java/awt/Component.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libjava/java/awt/Component.java') diff --git a/libjava/java/awt/Component.java b/libjava/java/awt/Component.java index 9c93bd0a527..94b74a6fdda 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; } /** -- cgit v1.2.3