From 197de32fb3ebc89b06d6abd16dfcc3dffa1be577 Mon Sep 17 00:00:00 2001 From: Anthony Petrov Date: Fri, 28 Aug 2009 19:34:00 +0400 Subject: [PATCH] 6689468: test/closed/java/awt/Component/VisibleHwInLwContTest/VisibleHwInLwContTest.html fails The addNotify() checks whether the component is actually hidden, and hides the peer appropriately if needed Reviewed-by: art, dcherepanov --- jdk/src/share/classes/java/awt/Component.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jdk/src/share/classes/java/awt/Component.java b/jdk/src/share/classes/java/awt/Component.java index ef3e2652a6c..2f85e511b24 100644 --- a/jdk/src/share/classes/java/awt/Component.java +++ b/jdk/src/share/classes/java/awt/Component.java @@ -6665,6 +6665,9 @@ public abstract class Component implements ImageObserver, MenuContainer, Container parent = this.parent; if (parent != null && parent.peer instanceof LightweightPeer) { relocateComponent(); + if (!isRecursivelyVisible()) { + peer.setVisible(false); + } } } invalidate();