All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----java.awt.Component | +----java.awt.Container | +----java.awt.Window | +----com.sun.java.swing.JWindow
window.add(child);Using JWindow the proper semantic is:
window.getContentPane().add(child);The same is true of setting LayoutManagers, removing components, listing children, etc. All these methods should normally be sent to the contentPane() instead of the JWindow itself. The contentPane() will always be non-null. Attempting to set it to null will cause the JWindow to throw an exception. The default contentPane() will have a BorderLayout manager set on it.
Please see the JRootPane documentation for a complete description of the contentPane(), glassPane(), and layeredPane() components.
protected JRootPane rootPane
public JWindow(JFrame frame)
protected void windowInit()
protected JRootPane createRootPane()
public void setContentPane(Container content)
public Container getContentPane()
public void setLayeredPane(JLayeredPane layered)
public JLayeredPane getLayeredPane()
public void setGlassPane(Component glass)
public Component getGlassPane()
protected void setRootPane(JRootPane root)
public JRootPane getRootPane()
All Packages Class Hierarchy This Package Previous Next Index