src/share/classes/java/awt/Window.java

Print this page

        

@@ -1020,11 +1020,11 @@
         } else {
             beforeFirstShow = false;
             closeSplashScreen();
             Dialog.checkShouldBeBlocked(this);
             super.show();
-            locationByPlatform = false;
+            setLocationByPlatform(false);
             for (int i = 0; i < ownedWindowList.size(); i++) {
                 Window child = ownedWindowList.elementAt(i).get();
                 if ((child != null) && child.showWithParent) {
                     child.show();
                     child.showWithParent = false;

@@ -1093,10 +1093,11 @@
         }
         if (isModalBlocked()) {
             modalBlocker.unblockWindow(this);
         }
         super.hide();
+        setLocationByPlatform(false);
     }
 
     final void clearMostRecentFocusOwnerOnHide() {
         /* do nothing */
     }

@@ -3032,11 +3033,11 @@
 
          syncLWRequests = f.get("syncLWRequests", systemSyncLWRequests);
          state = f.get("state", 0);
          focusableWindowState = f.get("focusableWindowState", true);
          windowSerializedDataVersion = f.get("windowSerializedDataVersion", 1);
-         locationByPlatform = f.get("locationByPlatform", locationByPlatformProp);
+         setLocationByPlatform(f.get("locationByPlatform", locationByPlatformProp));
          // Note: 1.4 (or later) doesn't use focusMgr
          focusMgr = (FocusManager)f.get("focusMgr", null);
          Dialog.ModalExclusionType et = (Dialog.ModalExclusionType)
              f.get("modalExclusionType", Dialog.ModalExclusionType.NO_EXCLUDE);
          setModalExclusionType(et); // since 6.0