JDK-4261172 : API Change: remove no-arg Window() constructor from java.awt.Window
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.3.0
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_7
  • CPU: sparc
  • Submitted: 1999-08-10
  • Updated: 1999-08-17
  • Resolved: 1999-08-17
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
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

Comments
EVALUATION This needs to be done for kestrel-FCS. brent.christian@eng 1999-08-09 Replaced by RFE 4262946 brent.christian@eng 1999-08-16
09-08-1999