Details
-
Bug
-
Resolution: Fixed
-
P3
-
8
-
b112
-
generic
-
generic
-
Verified
Description
Platform: Windows/Solaris
JDK: 7, 8
The following method:
http://download.oracle.com/javase/7/docs/api/java/awt/Window.html#setLocationByPlatform%28boolean%29
Says:
"Calls to setVisible, setLocation and setBounds after calling setLocationByPlatform clear this property of the Window."
However this is not satisfied for calls setVisible(false)
Please see the following code sample:
-------------------------------------------------------------------------------------
import java.awt.*;
public class ClearPropertySetVisibleFalse {
public static void main(String[] args) {
final Window w = new Window((Frame)null);
w.setLocationByPlatform(true);
w.setVisible(false);
System.out.println("isLocationByPlatform() = " + w.isLocationByPlatform());
}
}
-------------------------------------------------------------------------------------
The output will be
isLocationByPlatform() = true
JDK: 7, 8
The following method:
http://download.oracle.com/javase/7/docs/api/java/awt/Window.html#setLocationByPlatform%28boolean%29
Says:
"Calls to setVisible, setLocation and setBounds after calling setLocationByPlatform clear this property of the Window."
However this is not satisfied for calls setVisible(false)
Please see the following code sample:
-------------------------------------------------------------------------------------
import java.awt.*;
public class ClearPropertySetVisibleFalse {
public static void main(String[] args) {
final Window w = new Window((Frame)null);
w.setLocationByPlatform(true);
w.setVisible(false);
System.out.println("isLocationByPlatform() = " + w.isLocationByPlatform());
}
}
-------------------------------------------------------------------------------------
The output will be
isLocationByPlatform() = true