Java Platform 1.2
Beta 4

Class java.awt.Dialog

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Dialog
Direct Known Subclasses:
FileDialog, JDialog

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.

Since:
JDK1.0
See Also:
WindowEvent, Window.addWindowListener(java.awt.event.WindowListener), Serialized Form

Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT , CENTER_ALIGNMENT , LEFT_ALIGNMENT , RIGHT_ALIGNMENT , TOP_ALIGNMENT
 
Constructor Summary
Dialog(Dialog owner, String title, boolean modal)
          Constructs an initially invisible Dialog with a title.
Dialog(Dialog owner, String title)
          Constructs an initially invisible Dialog with a title.
Dialog(Dialog owner)
          Constructs an initially invisible Dialog with an empty title.
Dialog(Frame owner, boolean modal)
          Constructs an initially invisible Dialog with an empty title.
Dialog(Frame owner, String title, boolean modal)
          Constructs an initially invisible Dialog with a title.
Dialog(Frame owner, String title)
          Constructs an initially invisible Dialog with a title.
Dialog(Frame owner)
          Constructs an initially invisible Dialog with an empty title.
 
Method Summary
 void addNotify()
          Creates the dialog's peer.
 String getTitle()
          Gets the title of the dialog.
 boolean isModal()
          Indicates whether the dialog is modal.
 boolean isResizable()
          Indicates whether this dialog window is resizable.
protected  String paramString()
          Returns the parameter string representing the state of this dialog window.
 void setModal(boolean b)
          Specifies whether this dialog is modal.
 void setResizable(boolean resizable)
          Sets the resizable flag.
 void setTitle(String title)
          Sets the title of the Dialog.
 void show()
          Shows the dialog.
 
Methods inherited from class java.awt.Window
addWindowListener , applyResourceBundle , applyResourceBundle , dispose , getFocusOwner , getInputContext , getLocale , getOwnedWindows , getOwner , getToolkit , getWarningString , isShowing , pack , postEvent , processEvent , processWindowEvent , removeWindowListener , toBack , toFront
 
Methods inherited from class java.awt.Container
add , add , add , add , add , addContainerListener , addImpl , countComponents , deliverEvent , doLayout , findComponentAt , findComponentAt , getAlignmentX , getAlignmentY , getComponent , getComponentAt , getComponentAt , getComponentCount , getComponents , getInsets , getLayout , getMaximumSize , getMinimumSize , getPreferredSize , insets , invalidate , isAncestorOf , layout , list , list , locate , minimumSize , paint , paintComponents , preferredSize , print , printComponents , processContainerEvent , remove , remove , removeAll , removeContainerListener , removeNotify , setLayout , update , validate , validateTree
 
Methods inherited from class java.awt.Component
action , add , addComponentListener , addFocusListener , addInputMethodListener , addKeyListener , addMouseListener , addMouseMotionListener , addPropertyChangeListener , addPropertyChangeListener , bounds , checkImage , checkImage , coalesceEvents , contains , contains , createImage , createImage , disable , disableEvents , dispatchEvent , enable , enable , enableEvents , enableInputMethods , firePropertyChange , getBackground , getBounds , getBounds , getColorModel , getComponentOrientation , getCursor , getDropTarget , getFont , getFontMetrics , getForeground , getGraphics , getHeight , getInputMethodRequests , getLocation , getLocation , getLocationOnScreen , getName , getParent , getPeer , getSize , getSize , getTreeLock , getWidth , getX , getY , gotFocus , handleEvent , hasFocus , hide , imageUpdate , inside , isDisplayable , isDoubleBuffered , isEnabled , isFocusTraversable , isLightweight , isOpaque , isValid , isVisible , keyDown , keyUp , list , list , list , location , lostFocus , mouseDown , mouseDrag , mouseEnter , mouseExit , mouseMove , mouseUp , move , nextFocus , paintAll , prepareImage , prepareImage , printAll , processComponentEvent , processFocusEvent , processInputMethodEvent , processKeyEvent , processMouseEvent , processMouseMotionEvent , remove , removeComponentListener , removeFocusListener , removeInputMethodListener , removeKeyListener , removeMouseListener , removeMouseMotionListener , removePropertyChangeListener , removePropertyChangeListener , repaint , repaint , repaint , repaint , requestFocus , reshape , resize , resize , setBackground , setBounds , setBounds , setComponentOrientation , setCursor , setDropTarget , setEnabled , setFont , setForeground , setLocale , setLocation , setLocation , setName , setSize , setSize , setVisible , show , size , toString , transferFocus
 
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait
 

Constructor Detail

Dialog

public Dialog(Frame owner)
Constructs an initially invisible Dialog with an empty title.
Parameters:
owner - the owner of the dialog
Throws:
IllegalArgumentException - if owner is null
See Also:
Component.setSize(int, int), Component.setVisible(boolean)

Dialog

public Dialog(Frame owner,
              boolean modal)
Constructs an initially invisible Dialog with an empty title. A modal Dialog grabs all the input to the owner frame from the user.
Parameters:
owner - the owner of the dialog
modal - if true, dialog blocks input to the parent window when shown
Throws:
IllegalArgumentException - if owner is null

Dialog

public Dialog(Frame owner,
              String title)
Constructs an initially invisible Dialog with a title.
Parameters:
owner - the owner of the dialog
title - the title of the dialog. A null value will be accepted without causing a NullPointerException to be thrown.
Throws:
IllegalArgumentException - if owner is null
See Also:
Component.setSize(int, int), Component.setVisible(boolean)

Dialog

public Dialog(Frame owner,
              String title,
              boolean modal)
Constructs an initially invisible Dialog with a title. A modal Dialog grabs all the input to the owner frame from the user.
Parameters:
owner - the owner of the dialog
title - the title of the dialog. A null value will be accepted without causing a NullPointerException to be thrown.
modal - if true, dialog blocks input to the parent window when shown
Throws:
IllegalArgumentException - if owner is null
See Also:
Component.setSize(int, int), Component.setVisible(boolean)

Dialog

public Dialog(Dialog owner)
Constructs an initially invisible Dialog with an empty title.
Parameters:
owner - the owner of the dialog
Throws:
IllegalArgumentException - if owner is null
Since:
JDK1.2

Dialog

public Dialog(Dialog owner,
              String title)
Constructs an initially invisible Dialog with a title.
Parameters:
owner - the owner of the dialog
title - the title of the dialog. A null value will be accepted without causing a NullPointerException to be thrown.
Throws:
IllegalArgumentException - if owner is null
Since:
JDK1.2

Dialog

public Dialog(Dialog owner,
              String title,
              boolean modal)
Constructs an initially invisible Dialog with a title. A modal Dialog grabs all the input to the owning window from the user.
Parameters:
owner - the owner of the dialog
title - the title of the dialog. A null value will be accepted without causing a NullPointerException to be thrown.
modal - if true, dialog blocks input to the owning window when shown
Throws:
IllegalArgumentException - if owner is null
Since:
JDK1.2
Method Detail

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

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.
See Also:
setModal(boolean)

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()

getTitle

public String getTitle()
Gets the title of the dialog.
Returns:
the title of this dialog window. The title may be null.
See Also:
setTitle(java.lang.String)

setTitle

public void setTitle(String title)
Sets the title of the Dialog.
Parameters:
title - the new title being given to the dialog
See Also:
getTitle()

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
See Also:
Component.hide()

isResizable

public boolean isResizable()
Indicates whether this dialog window is resizable.
Returns:
true if the user can resize the dialog; false otherwise.
See Also:
setResizable(boolean)

setResizable

public void setResizable(boolean resizable)
Sets the resizable flag.
Parameters:
resizable - true if the user can resize this dialog; false otherwise.
See Also:
isResizable()

paramString

protected 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

Java Platform 1.2
Beta 4

Submit a bug or feature
Submit comments/suggestions about new javadoc look
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.
This documentation was generated with a post-Beta4 version of Javadoc.