JDialog (Swing)

Use a JDialog bean JDialog to provide a custom dialog. A dialog is typically used to display or gather information for a single purpose.

The JDialog bean provides a content pane in which to place other components. The content pane provides logical separation of the dialog from its child components. With the exception of a JMenuBar, user interface components are added to the content pane. The default content pane, a JDialogContentPane, is represented in the Beans List as the child of the JDialog bean. You can delete the default content pane and replace it with another container component.

Use a Dialog bean, rather than a JDialog bean, if you want to use AWT components in the dialog. Alternatively, use a JOptionPane bean to create any of a variety of standard dialogs.

Changing Default Property Settings
Setting Value Description
mode Load Set the value to Load for an Open File dialog
mode Save Set value to Save for an Save file dialog
directory specify the directory Define the initial directory selection information for the file dialog
file specify the file Define the initial file selection information for the file dialog


Related procedures
Composing a window

Related references
Sun's JDialog bean documentation
Window beans
Beans for visual composition