JDK-6986333 : Specify that JInternalFrame may behave incorrecly outside of a JDesktopPane
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: generic,other
  • CPU: generic,unknown
  • Submitted: 2010-09-21
  • Updated: 2012-10-01
  • Resolved: 2010-09-24
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.
JDK 7
7Resolved
Related Reports
Duplicate :  
Relates :  
Description
The specification of JIF states:

**************************************
Generally, you add JInternalFrames to a JDesktopPane. The UI delegates the look-and-feel-specific actions to the DesktopManager object maintained by the JDesktopPane.
**************************************

In some cases JIFs work perfectly fine in other containers (JPanel, etc.). But in some cases, especially when lightweight and heavyweight components are mixed in a component hierarchy, that is essential to put JIFs into the DesktopPane since the latter provides some additional support (like validating the component hierarchy, etc.) which the mixing feature relies upon. Therefore, it is suggested to extend the specification and additionally state:

**************************************
If a JIF object is added to a container other than JDP, certain features or capabilities may behave incorrectly. This includes but is not limited to the behavior when lightweight and heavyweight components are mixed in a component hierarchy (see {@link Component}): some heavyweight components may be displayed incorrectly.
**************************************

Comments
EVALUATION This bug was filed as a responce to the test case from CR #6985776, it was found that an InternalFrame was added to the frame's glassPane which is incorrect at least for one reason: the glassPane is treated as a system component and sometimes is used by Swing internals for particular goals, for example glassPane is made visible when an internalFrame is resized and made hidden when the resize is complete We never specify that and the users can use glassPane on their own risk, generally it is not specified that internalFrames can be added to JDesktopPane only but they are definitely not to be used in a glassPane. This CR is closed because the provided test case is incorrect, it may be reopen if problems with internalFrames e.g. inside JPanels are found
24-09-2010