jdk/src/share/classes/java/awt/Window.java
changeset 4261 126dc6fe0d7b
parent 3965 63aae8ce7f47
child 4366 4446f3b8a9b4
--- a/jdk/src/share/classes/java/awt/Window.java	Mon Oct 19 16:06:41 2009 +0400
+++ b/jdk/src/share/classes/java/awt/Window.java	Wed Oct 21 17:06:41 2009 +0400
@@ -767,7 +767,7 @@
             isPacked = true;
         }
 
-        validate();
+        validateUnconditionally();
     }
 
     /**
@@ -943,7 +943,7 @@
         if (peer == null) {
             addNotify();
         }
-        validate();
+        validateUnconditionally();
 
         isInShow = true;
         if (visible) {
@@ -2600,6 +2600,21 @@
     }
 
     /**
+     * Indicates if this container is a validate root.
+     * <p>
+     * {@code Window} objects are the validate roots, and, therefore, they
+     * override this method to return {@code true}.
+     *
+     * @return {@code true}
+     * @since 1.7
+     * @see java.awt.Container#isValidateRoot
+     */
+    @Override
+    public boolean isValidateRoot() {
+        return true;
+    }
+
+    /**
      * Dispatches an event to this window or one of its sub components.
      * @param e the event
      */