Duplicate :
|
|
Relates :
|
|
Relates :
|
In CCC request 4131642 for Kestrel, a java.awt.Window constructor was added which takes no arguments. This was added to enable the creation of full-screen Windows, a project for kestrel described in bug 4227141. From the CCC request: --- Proposed API change: java.awt.Window: /** * Create a window in fullscreen mode in the default * GraphicsConfiguration. */ public Window() --- The full-screen project is not being included in Kestrel, and there are also other reasons to remove this method: * java.awt.Window objects were not originally designed to be unowned, as they must be for there to be a no-arg Window() constructor. This is manifested in bug 4256840, and could lead to more subtle bugs. * the static method java.awt.Frame.getFrames() can currently be used to get a list of all top-level windows in an application. Between this and Window.getOwnedWindows() inherited by Frame, it is possible to get the entire GUI hierarchy. By adding unowned Windows, this ability is lost. A new method would have to be added, such as Window.getWindows() to return all the top-level Windows and Frames, and getFrames() would likely need to be deprecated. * it is unclear that this new constructor would be needed at all to implement full-screen Windows. Adding a method such as java.awt.Window.setFullScreen(boolean) or adding an entirely new class are two alternative strategies. Removing this unnecessary constructor is much more advantageous than making the necessary changes to properly implement it. It could be considered a left-over API change from a cancelled project. brent.christian@eng 1999-08-09 Upon further investigation, it is clear that the no-arg Window() constructor has been in the JDK for some time, however it has been a package-private method. The previous CCC request merely made the constructor public, enabling creation of unowned Windows. Window() should be restored to being package-private, rather than being removed altogether. brent.christian@eng 1999-08-11
|