
 |
Chapter 19 java.awt Reference |
 |
Dialog
Name
Dialog
The Dialog class provides a
special type of display window that is used for pop-up messages and acquiring
input from the user. Unlike most other components, dialogs are hidden by
default; you must call show()
to display them. Dialogs are always associated with a parent Frame.
A Dialog may be either modal
or non-modal; a modal dialog attracts all input typed by the user. The
default layout for a Dialog
is BorderLayout.
- Parameters
-
- parent
-
Frame that
is to act as the parent of Dialog.
- Throws
-
- IllegalArgumentException
-
If
parent is null.
- Description
-
Constructs a Dialog object.
- Parameters
-
- parent
-
Frame that
is to act as the parent of Dialog.
- modal
-
true if the
Dialog is modal; false
otherwise.
- Throws
-
- IllegalArgumentException
-
If
parent is null.
- Description
-
Replaced with Dialog(Frame, String, boolean).
- Parameters
-
- parent
-
Frame that
is to act as parent of Dialog.
- title
-
Initial title to use for Dialog.
- Throws
-
- IllegalArgumentException
-
If
parent is null.
- Description
-
Constructs a Dialog object
with given characteristics.
- Parameters
-
- parent
-
Frame that
is to act as parent of Dialog.
- title
-
Initial title to use for Dialog.
- modal
-
true if the
Dialog is modal; false
otherwise.
- Throws
-
- IllegalArgumentException
-
If
parent is null.
- Description
-
Constructs a Dialog object
with given characteristics.
- Overrides
-
Window.addNotify()
- Description
-
Creates Dialog's peer
and peers of contained components.
- Returns
-
The current title for the Dialog.
- Returns
-
true if modal, false
otherwise.
- Returns
-
true if resizable, false
otherwise.
- Parameters
-
- b
-
true
makes the Dialog modal; false
if the Dialog should be modeless.
- Description
-
Changes the modal state of the Dialog.
- Parameters
-
- resizable
-
true
makes the Dialog resizable;
false if the Dialog
cannot be resized.
- Description
-
Changes the resize state of the Dialog.
- Parameters
-
- title
-
New title for the Dialog.
- Description
-
Changes the title of the Dialog.
- Overrides
-
Window.show()
- Description
-
If the dialog is hidden, this method shows it. If the dialog is already
visible, this method brings it to the front.
- Returns
-
String with current settings of Dialog.
- Overrides
-
Container.paramString()
- Description
-
Helper method for toString()
to generate string of current settings.
FileDialog, Frame,
String, Window,
WindowEvent, WindowListener
|
|