From a54a826414383b3097b47f071edc5881f681b1fd Mon Sep 17 00:00:00 2001 From: tromey Date: Sat, 9 Nov 2002 23:23:32 +0000 Subject: * 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 --- libjava/java/awt/Window.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'libjava/java/awt/Window.java') 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; } - } -- cgit v1.2.3