diff options
author | Tom Tromey <tromey@redhat.com> | 2002-11-09 23:23:32 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-11-09 23:23:32 +0000 |
commit | ad980a7b82cb016020e69b4ce671efc4df7f354a (patch) | |
tree | cbcec3eb1a5a899152328b2d479df5693cd33f66 /libjava/java/awt/Window.java | |
parent | 9f689d92c0a7caa5883e7f88b7cc7666a52c9dcf (diff) | |
download | gcc-ad980a7b82cb016020e69b4ce671efc4df7f354a.zip gcc-ad980a7b82cb016020e69b4ce671efc4df7f354a.tar.gz gcc-ad980a7b82cb016020e69b4ce671efc4df7f354a.tar.bz2 |
List.java (processEvent): Added missing `else's.
* java/awt/List.java (processEvent): Added missing `else's.
* java/awt/Window.java (show): validate() before showing. Make
parent displayable.
(isDisplayable): New method.
From-SVN: r58961
Diffstat (limited to 'libjava/java/awt/Window.java')
-rw-r--r-- | libjava/java/awt/Window.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/libjava/java/awt/Window.java b/libjava/java/awt/Window.java index 7064511..b8befaf 100644 --- a/libjava/java/awt/Window.java +++ b/libjava/java/awt/Window.java @@ -158,14 +158,13 @@ public class Window extends Container */ public void pack() { - if (parent != null - && !parent.isDisplayable()) + if (parent != null && !parent.isDisplayable()) parent.addNotify(); if (peer == null) addNotify(); setSize(getPreferredSize()); - + validate(); } @@ -174,9 +173,12 @@ public class Window extends Container */ public void show() { + if (parent != null && !parent.isDisplayable()) + parent.addNotify(); if (peer == null) addNotify(); + validate(); super.show(); toFront(); } @@ -187,6 +189,13 @@ public class Window extends Container super.hide(); } + public boolean isDisplayable() + { + if (super.isDisplayable()) + return true; + return peer != null; + } + /** * Called to free any resource associated with this window. */ @@ -479,5 +488,4 @@ public class Window extends Container if (peer != null) return peer.getGraphicsConfiguration(); return null; } - } |