diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-09 23:23:32 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-09 23:23:32 +0000 |
commit | a54a826414383b3097b47f071edc5881f681b1fd (patch) | |
tree | cbcec3eb1a5a899152328b2d479df5693cd33f66 /libjava/java/awt/Window.java | |
parent | 80ecf7bae019aa262fbfa84c7043aa0c858ecb4e (diff) | |
download | ppe42-gcc-a54a826414383b3097b47f071edc5881f681b1fd.tar.gz ppe42-gcc-a54a826414383b3097b47f071edc5881f681b1fd.zip |
* java/awt/List.java (processEvent): Added missing `else's.
* java/awt/Window.java (show): validate() before showing. Make
parent displayable.
(isDisplayable): New method.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58961 138bc75d-0d04-0410-961f-82ee72b054a4
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 7064511b2b6..b8befaf0507 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; } - } |