The JWindow component contains a JRootPane
as its only child. The contentPane should be the parent
of any children of the JWindow.
As a conveniance add and its variants, remove and
setLayout have been overridden to forward to the
contentPane as necessary. This means you can write:
Please see the JRootPane documentation for a complete description of
the contentPane, glassPane, and
In a multi-screen environment, you can create a JWindow
on a different screen device. See Window for more
Warning: Swing is not thread safe. For more
information see Swing's Threading
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeansTM
has been added to the java.beans package.
Please see XMLEncoder .