java.awt
Class Dialog

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Dialog
All Implemented Interfaces:
java.awt.image.ImageObserver
Direct Known Subclasses:
FileDialog

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.


Field Summary
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Dialog(Frame parent, boolean modal)
          Constructs an initially invisible Dialog.
Dialog(Frame parent, String title, boolean modal)
          Constructs an initially invisible Dialog with a title.
 
Method Summary
 void addNotify()
          Creates the frame's peer.
 String getTitle()
          Gets the title of the Dialog.
 boolean isModal()
          Returns true if the Dialog is modal.
 boolean isResizable()
          Returns true if the user can resize the frame.
protected  String paramString()
          Returns the parameter String of this Dialog.
 void setResizable(boolean resizable)
          Sets the resizable flag.
 void setTitle(String title)
          Sets the title of the Dialog.
 
Methods inherited from class java.awt.Window
dispose, getToolkit, getWarningString, pack, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, countComponents, deliverEvent, getComponent, getComponents, getLayout, insets, layout, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, removeAll, removeNotify, setLayout, validate
 
Methods inherited from class java.awt.Component
action, bounds, checkImage, checkImage, createImage, createImage, disable, enable, enable, getBackground, getColorModel, getFont, getFontMetrics, getForeground, getGraphics, getParent, getPeer, gotFocus, handleEvent, hide, imageUpdate, inside, invalidate, isEnabled, isShowing, isValid, isVisible, keyDown, keyUp, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, prepareImage, prepareImage, print, printAll, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setFont, setForeground, show, size, toString, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Dialog

public Dialog(Frame parent,
              boolean modal)
Constructs an initially invisible Dialog. A modal Dialog grabs all the input from the user.

Parameters:
parent - the owner of the dialog
modal - if true, dialog blocks input to other windows when shown
See Also:
Component.resize(int, int), Component.show()

Dialog

public Dialog(Frame parent,
              String title,
              boolean modal)
Constructs an initially invisible Dialog with a title. A modal Dialog grabs all the input from the user.

Parameters:
parent - the owner of the dialog
title - the title of the dialog
modal - if true, dialog blocks input to other windows when shown
See Also:
Component.resize(int, int), Component.show()
Method Detail

addNotify

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

Overrides:
addNotify in class Window
See Also:
Container.removeNotify()

isModal

public boolean isModal()
Returns true if the Dialog is modal. A modal Dialog grabs all the input from the user.


getTitle

public String getTitle()
Gets the title of the Dialog.

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

isResizable

public boolean isResizable()
Returns true if the user can resize the frame.


setResizable

public void setResizable(boolean resizable)
Sets the resizable flag.

Parameters:
resizable - true if resizable; false otherwise

paramString

protected String paramString()
Returns the parameter String of this Dialog.

Overrides:
paramString in class Container