From: Thomas Fitzsimmons Date: Thu, 22 Jan 2004 00:22:27 +0000 (+0000) Subject: Component.java (show): Set visible to true before showing the peer. X-Git-Tag: releases/gcc-4.0.0~10853 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=75ef0594a381f1760140e568d08e80fd685274e6;p=thirdparty%2Fgcc.git 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 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 995aad906e1d..4b38db9b3649 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2004-01-21 Thomas Fitzsimmons + + * java/awt/Component.java (show): Set visible to true before + showing the peer. + 2004-01-21 Kim Ho * gnu/java/awt/peer/gtk/GtkFramePeer.java (postConfigureEvent): diff --git a/libjava/java/awt/Component.java b/libjava/java/awt/Component.java index 9c93bd0a5278..94b74a6fdda3 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; } /**