changeset 1105:a2082e850247

6811674: Container.setComponentZOrder throws NPE Reviewed-by: art, dcherepanov
author anthony
date Tue, 03 Mar 2009 13:54:47 +0300
parents b22974c82ca8
children ae27b7949714
files src/share/classes/java/awt/Container.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/awt/Container.java	Sun Feb 22 12:26:39 2009 -0800
+++ b/src/share/classes/java/awt/Container.java	Tue Mar 03 13:54:47 2009 +0300
@@ -506,7 +506,9 @@
             adjustDescendants(-(comp.countHierarchyMembers()));
 
             comp.parent = null;
-            comp.setGraphicsConfiguration(null);
+            if (needRemoveNotify) {
+                comp.setGraphicsConfiguration(null);
+            }
             component.remove(index);
 
             invalidateIfValid();