This RFE replaces RFE 4261172.
CCC proposal 4131642 for Kestrel included two new public constructors in the java.awt.Window class that allowed Windows to be created without specifying an owning Window or Frame. These are the public Window() and public Window(GraphicsConfiguration) constructors.
* The no-argument constructor was to be used for creating Windows displayable in full-screen mode. Here's the relevant snippet from the original request:
java.awt.Window:
/**
* Create a window in fullscreen mode in the default
* GraphicsConfiguration.
*/
public Window()
* The constructor taking only a GraphicsConfiguration reference was added for multi-screen support, and to match the JWindow API.
/**
* Construct a new invisible window in full screen
* mode with the
* specified GraphicsConfiguration.
* @param gc the GraphicsConfiguration that is used
* to construct the new Window with. If gc is null,
* the system default GraphicsConfiguration is assumed.
* @exception IllegalArgumentException if gc is not from
* a screen device.
* @since 1.3
*/
public Window(GraphicsConfiguration gc)
There are several compelling reasons to remove these constructors from the public API in Kestrel.
* Ownerless Windows were not part of the original spec for the Window class. Attempted creation of unowned Windows has lead to bug 4256840, and could produce other unforseen bugs.
* On a related note, the static method in java.awt.Frame, getFrames() returns a list of all top-level entities (Frames) in the application. In combination with the Window method getOwnedWindows(), it is possible to obtain the entire tree of GUI components in a Java app. Adding the ability to create Windows which are not owned by any Frame will prevent this tree from being available through Frame.getFrames(). To preserve this functionality, a method would need to be added to Window such as getWindows() to provide access to these unowned Windows as well as the Frames from getFrames(). The getFrames() method should also be deprecated in this case. This all results in further changes to the public API.
* Upon further analysis, there are alternate ways of adding full-screen support to AWT - adding a java.awt.Window.setFullscreenMode(boolean), for instance. Implementing full-screen Windows in this way would not affect the Window's ownership. Considering this, the original need for the no-arg Window() constructor is greatly diminished.
* Removal of these constructors does not result in any loss of functionality. Borderless Windows can still be created with the present Window(Window owner) and Window(Frame owner) constructors. Windows requiring a specific GraphicsConfiguration (as needed by Java3D) are constructed with the new Window(Window owner, GraphicsConfiguration) constructor.
* Again, this is not a modification to the current public API (1.2), but a modification to another change request for Kestrel.