-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
Affects Version/s: 8
-
Component/s: client-libs
-
b112
-
generic
-
generic
-
Verified
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