JDK-6885827 : Component should have a reference to the top-level component it resides in
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2009-09-25
  • Updated: 2021-07-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
There are the following methods: SwingUtilities.getWindowAncestor(Component c) and SunToolkit.getContainingWindow(Component c) that are used to retrieve the top-level root of the hierarchy for a given component.

These methods used in a number of places in the code Swing and AWT code. Lately we started to use them more often in order to determine whether the top-level window is non-opaque. This, however, seems to be done quite often: even the Swing repainting machinery (which should work as fast as possible) needs this information.

This change request is about adding a reference to the top-level component right in the Component object in order to be able to retrive it fast.