All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----java.awt.Component | +----java.awt.Container | +----java.awt.Window | +----java.awt.Dialog | +----com.sun.java.swing.JDialog
dialog.add(child);Using JDialog the proper semantic is:
dialog.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 JDialog itself. The contentPane() will always be non-null. Attempting to set it to null will cause the JDialog 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 JDialog(JFrame parent)
public JDialog(JFrame parent, boolean modal)
public JDialog(JFrame parent, String title)
public JDialog(JFrame parent, String title, boolean modal)
protected void dialogInit()
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