Class java.awt.Dialog
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.awt.Dialog

Object
   |
   +----Component
           |
           +----Container
                   |
                   +----Window
                           |
                           +----java.awt.Dialog

public class Dialog
extends Window
A class that produces a dialog - a window that takes input from the user. The default layout for a dialog is BorderLayout.

Dialogs are capable of generating the following window events: WindowOpened, WindowClosing, WindowClosed, WindowActivated, WindowDeactivated.

Version:
1.38, 12/03/97
Author:
Sami Shaio, Arthur van Hoff
Since:
JDK1.0
See Also:
WindowEvent, addWindowListener

Constructor Index

 o java.awt.Dialog(Frame)
Constructs an initially invisible Dialog with an empty title.
 o java.awt.Dialog(Frame, boolean)
Constructs an initially invisible Dialog with an empty title.
 o java.awt.Dialog(Frame, String)
Constructs an initially invisible Dialog with a title.
 o java.awt.Dialog(Frame, String, boolean)
Constructs an initially invisible Dialog with a title.

Method Index

 o addNotify()
Creates the dialog's peer.
 o getTitle()
Gets the title of the dialog.
 o isModal()
Indicates whether the dialog is modal.
 o isResizable()
Indicates whether this dialog window is resizable.
 o paramString()
Returns the parameter string representing the state of this dialog window.
 o setModal(boolean)
Specifies whether this dialog is modal.
 o setResizable(boolean)
Sets the resizable flag.
 o setTitle(String)
Sets the title of the Dialog.
 o show()
Shows the dialog.

Constructors

 o Dialog
public Dialog(Frame parent)
Constructs an initially invisible Dialog with an empty title.

Parameters:
parent - the owner of the dialog
Since:
JDK1.0
See Also:
setSize, setVisible
 o Dialog
public Dialog(Frame parent,
              boolean modal)
Constructs an initially invisible Dialog with an empty title. A modal Dialog grabs all the input to the parent frame from the user.

Parameters:
parent - the owner of the dialog
modal - if true, dialog blocks input to the parent window when shown
 o Dialog
public Dialog(Frame parent,
              String title)
Constructs an initially invisible Dialog with a title.

Parameters:
parent - the owner of the dialog
title - the title of the dialog
Since:
JDK1.0
See Also:
setSize, setVisible
 o Dialog
public Dialog(Frame parent,
              String title,
              boolean modal)
Constructs an initially invisible Dialog with a title. A modal Dialog grabs all the input to the parent frame from the user.

Parameters:
parent - the owner of the dialog
title - the title of the dialog
modal - if true, dialog blocks input to the parent window when shown
Since:
JDK1.0
See Also:
setSize, setVisible

Methods

 o addNotify
public void addNotify()
Creates the dialog's peer. The peer allows us to change the appearance of the frame without changing its functionality.

Overrides:
addNotify in class Window
Since:
JDK1.0
 o getTitle
public java.lang.String getTitle()
Gets the title of the dialog.

Returns:
the title of this dialog window.
Since:
JDK1.0
See Also:
setTitle
 o isModal
public boolean isModal()
Indicates whether the dialog is modal. A modal dialog grabs all input from the user.

Returns:
true if this dialog window is modal; false otherwise.
Since:
JDK1.0
See Also:
setModal
 o isResizable
public boolean isResizable()
Indicates whether this dialog window is resizable.

Returns:
true if the user can resize the dialog; false otherwise.
Since:
JDK1.0
See Also:
setResizable
 o paramString
protected java.lang.String paramString()
Returns the parameter string representing the state of this dialog window. This string is useful for debugging.

Returns:
the parameter string of this dialog window.
Overrides:
paramString in class Container
Since:
JDK1.0
 o setModal
public void setModal(boolean b)
Specifies whether this dialog is modal. A modal Dialog grabs all the input to the parent frame from the user.

Since:
JDK1.1
See Also:
isModal
 o setResizable
public synchronized void setResizable(boolean resizable)
Sets the resizable flag.

Parameters:
resizable - true if the user can resize this dialog; false otherwise.
Since:
JDK1.0
See Also:
isResizable
 o setTitle
public synchronized void setTitle(String title)
Sets the title of the Dialog.

Parameters:
title - the new title being given to the dialog
Since:
JDK1.0
See Also:
getTitle
 o show
public void show()
Shows the dialog. This will bring the dialog to the front if the dialog is already visible. If the dialog is modal, this call will block input to the parent window until the dialog is taken down by calling hide or dispose. It is permissible to show modal dialogs from the event dispatching thread because the toolkit will ensure that another dispatching thread will run while the one which invoked show is blocked.

Overrides:
show in class Window
Since:
JDK1.0
See Also:
hide

All Packages  Class Hierarchy  This Package  Previous  Next  Index