All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.JWindow

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----com.sun.java.swing.JWindow

public class JWindow
extends Window
The JWindow component contains a JRootPane as it's only child. The contentPane() should be the parent of any children of the JWindow. From the older java.awt.Window object you would normally do something:
       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.

See Also:
JRootPane

Variable Index

 o rootPane

Constructor Index

 o JWindow(JFrame)

Method Index

 o createRootPane()
Called by the constructor methods to create the default rootPane.
 o getContentPane()
 o getGlassPane()
 o getLayeredPane()
 o getRootPane()
 o setContentPane(Container)
 o setGlassPane(Component)
 o setLayeredPane(JLayeredPane)
 o setRootPane(JRootPane)
 o windowInit()
Called by the constructors to init the JWindow properly.

Variables

 o rootPane
 protected JRootPane rootPane

Constructors

 o JWindow
 public JWindow(JFrame frame)

Methods

 o windowInit
 protected void windowInit()
Called by the constructors to init the JWindow properly.

 o createRootPane
 protected JRootPane createRootPane()
Called by the constructor methods to create the default rootPane.

 o setContentPane
 public void setContentPane(Container content)
 o getContentPane
 public Container getContentPane()
 o setLayeredPane
 public void setLayeredPane(JLayeredPane layered)
 o getLayeredPane
 public JLayeredPane getLayeredPane()
 o setGlassPane
 public void setGlassPane(Component glass)
 o getGlassPane
 public Component getGlassPane()
 o setRootPane
 protected void setRootPane(JRootPane root)
 o getRootPane
 public JRootPane getRootPane()

All Packages  Class Hierarchy  This Package  Previous  Next  Index