aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog5
-rw-r--r--libjava/java/awt/Component.java7
2 files changed, 11 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 995aad9..4b38db9 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,8 @@
+2004-01-21 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * java/awt/Component.java (show): Set visible to true before
+ showing the peer.
+
2004-01-21 Kim Ho <kho@redhat.com>
* gnu/java/awt/peer/gtk/GtkFramePeer.java (postConfigureEvent):
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;
}
/**