--- old/src/share/classes/java/awt/Window.java 2012-02-22 15:35:09.408859700 +0400 +++ new/src/share/classes/java/awt/Window.java 2012-02-22 15:35:08.626814900 +0400 @@ -226,7 +226,8 @@ static boolean systemSyncLWRequests = false; boolean syncLWRequests = false; transient boolean beforeFirstShow = true; - + private transient boolean disposing = false; + static final int OPENED = 0x01; /** @@ -1162,6 +1163,7 @@ void doDispose() { class DisposeAction implements Runnable { public void run() { + disposing = true; // Check if this window is the fullscreen window for the // device. Exit the fullscreen mode prior to disposing // of the window if that's the case. @@ -1192,6 +1194,7 @@ } } clearCurrentFocusCycleRootOnHide(); + disposing = false; } } DisposeAction action = new DisposeAction(); @@ -2734,6 +2737,10 @@ return visible; } + boolean isDisposing() { + return disposing; + } + /** * @deprecated As of J2SE 1.4, replaced by * {@link Component#applyComponentOrientation Component.applyComponentOrientation}.