Index: java/awt/Component.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/Component.java,v retrieving revision 1.80 diff -u -r1.80 Component.java --- java/awt/Component.java 12 Oct 2005 15:25:10 -0000 1.80 +++ java/awt/Component.java 19 Oct 2005 16:05:17 -0000 @@ -762,7 +762,7 @@ if (! visible || peer == null) return false; - return parent == null ? true : parent.isShowing(); + return parent == null ? false : parent.isShowing(); } /** @@ -903,7 +903,8 @@ // The JDK repaints the component before invalidating the parent. // So do we. - repaint(); + if (isShowing()) + repaint(); // Invalidate the parent if we have one. The component itself must // not be invalidated. We also avoid NullPointerException with // a local reference here. @@ -945,12 +946,13 @@ ComponentPeer currentPeer=peer; if (currentPeer != null) currentPeer.setVisible(false); - + boolean wasShowing = isShowing(); this.visible = false; // The JDK repaints the component before invalidating the parent. // So do we. - repaint(); + if (wasShowing) + repaint(); // Invalidate the parent if we have one. The component itself must // not be invalidated. We also avoid NullPointerException with // a local reference here.