Class Dialog
- All Implemented Interfaces:
- 
ImageObserver,MenuContainer,Serializable,Accessible
- Direct Known Subclasses:
- 
FileDialog,JDialog
public class Dialog extends Window
getInsets method, however, since these dimensions are platform-dependent, a valid insets value cannot be obtained until the dialog is made displayable by either calling pack or show. Since the border area is included in the overall size of the dialog, the border effectively obscures a portion of the dialog, constraining the area available for rendering and/or displaying subcomponents to the rectangle which has an upper-left corner location of (insets.left, insets.top), and has a size of width - (insets.left + insets.right) by height - (insets.top + insets.bottom).  The default layout for a dialog is BorderLayout. 
 A dialog may have its native decorations (i.e. Frame & Titlebar) turned off with setUndecorated. This can only be done while the dialog is not displayable. 
A dialog may have another window as its owner when it's constructed. When the owner window of a visible dialog is minimized, the dialog will automatically be hidden from the user. When the owner window is subsequently restored, the dialog is made visible to the user again.
 In a multi-screen environment, you can create a Dialog on a different screen device than its owner. See Frame for more information. 
A dialog can be either modeless (the default) or modal. A modal dialog is one which blocks input to some other top-level windows in the application, except for any windows created with the dialog as their owner. See AWT Modality specification for details.
 Dialogs are capable of generating the following WindowEvents: WindowOpened, WindowClosing, WindowClosed, WindowActivated, WindowDeactivated, WindowGainedFocus, WindowLostFocus.
- Since:
- 1.0
- See Also:
Nested Class Summary
| Modifier and Type | Class | Description | 
|---|---|---|
| protected class  | Dialog.AccessibleAWTDialog | This class implements accessibility support for the  Dialogclass. | 
| static enum  | Dialog.ModalExclusionType | Any top-level window can be marked not to be blocked by modal dialogs. | 
| static enum  | Dialog.ModalityType | Modal dialogs block all input to some top-level windows. | 
Nested classes/interfaces declared in class java.awt.Window
Window.AccessibleAWTWindow, Window.Type
Nested classes/interfaces declared in class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces declared in class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Field Summary
| Modifier and Type | Field | Description | 
|---|---|---|
| static final Dialog.ModalityType | DEFAULT_MODALITY_TYPE | Default modality type for modal dialogs. | 
Fields declared in class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields declared in interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
| Constructor | Description | 
|---|---|
| Dialog | Constructs an initially invisible, modeless  Dialogwith the specified ownerDialogand an empty title. | 
| Dialog | Constructs an initially invisible, modeless  Dialogwith the specified ownerDialogand title. | 
| Dialog | Constructs an initially invisible  Dialogwith the specified ownerDialog, title, and modality. | 
| Dialog | Constructs an initially invisible  Dialogwith the specified ownerDialog, title, modality andGraphicsConfiguration. | 
| Dialog | Constructs an initially invisible, modeless  Dialogwith the specified ownerFrameand an empty title. | 
| Dialog | Constructs an initially invisible  Dialogwith the specified ownerFrameand modality and an empty title. | 
| Dialog | Constructs an initially invisible, modeless  Dialogwith the specified ownerFrameand title. | 
| Dialog | Constructs an initially invisible  Dialogwith the specified ownerFrame, title and modality. | 
| Dialog | Constructs an initially invisible  Dialogwith the specified ownerFrame, title, modality, andGraphicsConfiguration. | 
| Dialog | Constructs an initially invisible, modeless  Dialogwith the specified ownerWindowand an empty title. | 
| Dialog | Constructs an initially invisible  Dialogwith the specified ownerWindowand modality and an empty title. | 
| Dialog | Constructs an initially invisible, modeless  Dialogwith the specified ownerWindowand title. | 
| Dialog | Constructs an initially invisible  Dialogwith the specified ownerWindow, title and modality. | 
| Dialog | Constructs an initially invisible  Dialogwith the specified ownerWindow, title, modality andGraphicsConfiguration. | 
Method Summary
| Modifier and Type | Method | Description | 
|---|---|---|
| void | addNotify() | Makes this Dialog displayable by connecting it to a native screen resource. | 
| AccessibleContext | getAccessibleContext() | Gets the AccessibleContext associated with this Dialog. | 
| Dialog.ModalityType | getModalityType() | Returns the modality type of this dialog. | 
| String | getTitle() | Gets the title of the dialog. | 
| void | hide() | 
Deprecated.  | 
| boolean | isModal() | Indicates whether the dialog is modal. | 
| boolean | isResizable() | Indicates whether this dialog is resizable by the user. | 
| boolean | isUndecorated() | Indicates whether this dialog is undecorated. | 
| protected String | paramString() | Returns a string representing the state of this dialog. | 
| void | setModal | Specifies whether this dialog should be modal. | 
| void | setModalityType | Sets the modality type for this dialog. | 
| void | setResizable | Sets whether this dialog is resizable by the user. | 
| void | setTitle | Sets the title of the Dialog. | 
| void | setUndecorated | Disables or enables decorations for this dialog. | 
| void | setVisible | Shows or hides this  Dialogdepending on the value of parameterb. | 
| void | show() | 
Deprecated.  As of JDK version 1.5, replaced by  setVisible(boolean). | 
| void | toBack() | If this Window is visible, sends this Window to the back and may cause it to lose focus or activation if it is the focused or active Window. | 
Methods declared in class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBackground, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setOpacity, setShape, setSize, setSize, setType, toFront
Methods declared in class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validate, validateTree
Methods declared in class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
Field Details
DEFAULT_MODALITY_TYPE
public static final Dialog.ModalityType DEFAULT_MODALITY_TYPE
APPLICATION_MODAL. Calling the oldstyle setModal(true) is equal to setModalityType(DEFAULT_MODALITY_TYPE).- Since:
- 1.6
- See Also:
Constructor Details
Dialog
public Dialog(Frame owner)
Dialog with the specified owner Frame and an empty title.- Parameters:
- 
owner- the owner of the dialog ornullif this dialog has no owner
- Throws:
- 
IllegalArgumentException- if theowner'sGraphicsConfigurationis not from a screen device
- 
HeadlessException- whenGraphicsEnvironment.isHeadless()returnstrue
- See Also:
Dialog
public Dialog(Frame owner, boolean modal)
Dialog with the specified owner Frame and modality and an empty title.- Parameters:
- 
owner- the owner of the dialog ornullif this dialog has no owner
- 
modal- specifies whether dialog blocks user input to other top-level windows when shown. Iffalse, the dialog isMODELESS; iftrue, the modality type property is set toDEFAULT_MODALITY_TYPE
- Throws:
- 
IllegalArgumentException- if theowner'sGraphicsConfigurationis not from a screen device
- 
HeadlessException- whenGraphicsEnvironment.isHeadless()returnstrue
- See Also:
Dialog
public Dialog(Frame owner, String title)
Dialog with the specified owner Frame and title.- Parameters:
- 
owner- the owner of the dialog ornullif this dialog has no owner
- 
title- the title of the dialog ornullif this dialog has no title
- Throws:
- 
IllegalArgumentException- if theowner'sGraphicsConfigurationis not from a screen device
- 
HeadlessException- whenGraphicsEnvironment.isHeadless()returnstrue
- See Also:
Dialog
public Dialog(Frame owner, String title, boolean modal)
Dialog with the specified owner Frame, title and modality.- Parameters:
- 
owner- the owner of the dialog ornullif this dialog has no owner
- 
title- the title of the dialog ornullif this dialog has no title
- 
modal- specifies whether dialog blocks user input to other top-level windows when shown. Iffalse, the dialog isMODELESS; iftrue, the modality type property is set toDEFAULT_MODALITY_TYPE
- Throws:
- 
IllegalArgumentException- if theowner'sGraphicsConfigurationis not from a screen device
- 
HeadlessException- whenGraphicsEnvironment.isHeadless()returnstrue
- See Also:
Dialog
public Dialog(Frame owner, String title, boolean modal, GraphicsConfiguration gc)
Dialog with the specified owner Frame, title, modality, and GraphicsConfiguration.- Parameters:
- 
owner- the owner of the dialog ornullif this dialog has no owner
- 
title- the title of the dialog ornullif this dialog has no title
- 
modal- specifies whether dialog blocks user input to other top-level windows when shown. Iffalse, the dialog isMODELESS; iftrue, the modality type property is set toDEFAULT_MODALITY_TYPE
- 
gc- theGraphicsConfigurationof the target screen device; ifnull, the default systemGraphicsConfigurationis assumed
- Throws:
- 
IllegalArgumentException- ifgcis not from a screen device
- 
HeadlessException- whenGraphicsEnvironment.isHeadless()returnstrue
- Since:
- 1.4
- See Also:
Dialog
public Dialog(Dialog owner)
Dialog with the specified owner Dialog and an empty title.- Parameters:
- 
owner- the owner of the dialog ornullif this dialog has no owner
- Throws:
- 
IllegalArgumentException- if theowner'sGraphicsConfigurationis not from a screen device
- 
HeadlessException- whenGraphicsEnvironment.isHeadless()returnstrue
- Since:
- 1.2
- See Also:
Dialog
public Dialog(Dialog owner, String title)
Dialog with the specified owner Dialog and title.- Parameters:
- 
owner- the owner of the dialog ornullif this has no owner
- 
title- the title of the dialog ornullif this dialog has no title
- Throws:
- 
IllegalArgumentException- if theowner'sGraphicsConfigurationis not from a screen device
- 
HeadlessException- whenGraphicsEnvironment.isHeadless()returnstrue
- Since:
- 1.2
- See Also:
Dialog
public Dialog(Dialog owner, String title, boolean modal)
Dialog with the specified owner Dialog, title, and modality.- Parameters:
- 
owner- the owner of the dialog ornullif this dialog has no owner
- 
title- the title of the dialog ornullif this dialog has no title
- 
modal- specifies whether dialog blocks user input to other top-level windows when shown. Iffalse, the dialog isMODELESS; iftrue, the modality type property is set toDEFAULT_MODALITY_TYPE
- Throws:
- 
IllegalArgumentException- if theowner'sGraphicsConfigurationis not from a screen device
- 
HeadlessException- whenGraphicsEnvironment.isHeadless()returnstrue
- Since:
- 1.2
- See Also:
Dialog
public Dialog(Dialog owner, String title, boolean modal, GraphicsConfiguration gc)
Dialog with the specified owner Dialog, title, modality and GraphicsConfiguration.- Parameters:
- 
owner- the owner of the dialog ornullif this dialog has no owner
- 
title- the title of the dialog ornullif this dialog has no title
- 
modal- specifies whether dialog blocks user input to other top-level windows when shown. Iffalse, the dialog isMODELESS; iftrue, the modality type property is set toDEFAULT_MODALITY_TYPE
- 
gc- theGraphicsConfigurationof the target screen device; ifnull, the default systemGraphicsConfigurationis assumed
- Throws:
- 
IllegalArgumentException- ifgcis not from a screen device
- 
HeadlessException- whenGraphicsEnvironment.isHeadless()returnstrue
- Since:
- 1.4
- See Also:
Dialog
public Dialog(Window owner)
Dialog with the specified owner Window and an empty title.- Parameters:
- 
owner- the owner of the dialog. The owner must be an instance ofDialog,Frame, any of their descendants ornull
- Throws:
- 
IllegalArgumentException- if theowneris not an instance ofDialogorFrame
- 
IllegalArgumentException- if theowner'sGraphicsConfigurationis not from a screen device
- 
HeadlessException- whenGraphicsEnvironment.isHeadless()returnstrue
- Since:
- 1.6
- See Also:
Dialog
public Dialog(Window owner, String title)
Dialog with the specified owner Window and title.- Parameters:
- 
owner- the owner of the dialog. The owner must be an instance ofDialog,Frame, any of their descendants ornull
- 
title- the title of the dialog ornullif this dialog has no title
- Throws:
- 
IllegalArgumentException- if theowneris not an instance ofDialogorFrame
- 
IllegalArgumentException- if theowner'sGraphicsConfigurationis not from a screen device
- 
HeadlessException- whenGraphicsEnvironment.isHeadless()returnstrue
- Since:
- 1.6
- See Also:
Dialog
public Dialog(Window owner, Dialog.ModalityType modalityType)
Dialog with the specified owner Window and modality and an empty title.- Parameters:
- 
owner- the owner of the dialog. The owner must be an instance ofDialog,Frame, any of their descendants ornull
- 
modalityType- specifies whether dialog blocks input to other windows when shown.nullvalue and unsupported modality types are equivalent toMODELESS
- Throws:
- 
IllegalArgumentException- if theowneris not an instance ofDialogorFrame
- 
IllegalArgumentException- if theowner'sGraphicsConfigurationis not from a screen device
- 
HeadlessException- whenGraphicsEnvironment.isHeadless()returnstrue
- 
SecurityException- if the calling thread does not have permission to create modal dialogs with the givenmodalityType
- Since:
- 1.6
- See Also:
Dialog
public Dialog(Window owner, String title, Dialog.ModalityType modalityType)
Dialog with the specified owner Window, title and modality.- Parameters:
- 
owner- the owner of the dialog. The owner must be an instance ofDialog,Frame, any of their descendants ornull
- 
title- the title of the dialog ornullif this dialog has no title
- 
modalityType- specifies whether dialog blocks input to other windows when shown.nullvalue and unsupported modality types are equivalent toMODELESS
- Throws:
- 
IllegalArgumentException- if theowneris not an instance ofDialogorFrame
- 
IllegalArgumentException- if theowner'sGraphicsConfigurationis not from a screen device
- 
HeadlessException- whenGraphicsEnvironment.isHeadless()returnstrue
- 
SecurityException- if the calling thread does not have permission to create modal dialogs with the givenmodalityType
- Since:
- 1.6
- See Also:
Dialog
public Dialog(Window owner, String title, Dialog.ModalityType modalityType, GraphicsConfiguration gc)
Dialog with the specified owner Window, title, modality and GraphicsConfiguration.- Parameters:
- 
owner- the owner of the dialog. The owner must be an instance ofDialog,Frame, any of their descendants ornull
- 
title- the title of the dialog ornullif this dialog has no title
- 
modalityType- specifies whether dialog blocks input to other windows when shown.nullvalue and unsupported modality types are equivalent toMODELESS
- 
gc- theGraphicsConfigurationof the target screen device; ifnull, the default systemGraphicsConfigurationis assumed
- Throws:
- 
IllegalArgumentException- if theowneris not an instance ofDialogorFrame
- 
IllegalArgumentException- ifgcis not from a screen device
- 
HeadlessException- whenGraphicsEnvironment.isHeadless()returnstrue
- 
SecurityException- if the calling thread does not have permission to create modal dialogs with the givenmodalityType
- Since:
- 1.6
- See Also:
Method Details
addNotify
public void addNotify()
isModal
public boolean isModal()
 This method is obsolete and is kept for backwards compatibility only. Use getModalityType() instead.
- Returns:
- 
trueif this dialog window is modal;falseotherwise
- See Also:
setModal
public void setModal(boolean modal)
 This method is obsolete and is kept for backwards compatibility only. Use setModalityType() instead. 
Note: changing modality of the visible dialog may have no effect until it is hidden and then shown again.
- Parameters:
- 
modal- specifies whether dialog blocks input to other windows when shown; calling tosetModal(true)is equivalent tosetModalityType(Dialog.DEFAULT_MODALITY_TYPE), and calling tosetModal(false)is equivalent tosetModalityType(Dialog.ModalityType.MODELESS)
- Since:
- 1.1
- See Also:
getModalityType
public Dialog.ModalityType getModalityType()
- Returns:
- modality type of this dialog
- Since:
- 1.6
- See Also:
setModalityType
public void setModalityType(Dialog.ModalityType type)
ModalityType for possible modality types.  If the given modality type is not supported, MODELESS is used. You may want to call getModalityType() after calling this method to ensure that the modality type has been set. 
Note: changing modality of the visible dialog may have no effect until it is hidden and then shown again.
- Parameters:
- 
type- specifies whether dialog blocks input to other windows when shown.nullvalue and unsupported modality types are equivalent toMODELESS
- Throws:
- 
SecurityException- if the calling thread does not have permission to create modal dialogs with the givenmodalityType
- Since:
- 1.6
- See Also:
getTitle
public String getTitle()
- Returns:
- the title of this dialog window. The title may be null.
- See Also:
setTitle
public void setTitle(String title)
- Parameters:
- 
title- the title displayed in the dialog's border; a null value results in an empty title
- See Also:
setVisible
public void setVisible(boolean b)
Dialog depending on the value of parameter b.- Overrides:
- 
setVisiblein classWindow
- Parameters:
- 
b- iftrue, makes theDialogvisible, otherwise hides theDialog. If the dialog and/or its owner are not yet displayable, both are made displayable. The dialog will be validated prior to being made visible. Iffalse, hides theDialogand then causessetVisible(true)to return if it is currently blocked.Notes for modal dialogs. - 
setVisible(true): If the dialog is not already visible, this call will not return until the dialog is hidden by callingsetVisible(false)ordispose.
- 
setVisible(false): Hides the dialog and then returns onsetVisible(true)if it is currently blocked.
- It is OK to call this method from the event dispatching thread because the toolkit ensures that other events are not blocked while this method is blocked.
 
- 
- See Also:
show
@Deprecated public void show()
setVisible(boolean).Dialog visible. If the dialog and/or its owner are not yet displayable, both are made displayable. The dialog will be validated prior to being made visible. If the dialog is already visible, this will bring the dialog to the front. If the dialog is modal and is not already visible, this call will not return until the dialog is hidden by calling hide or dispose. It is permissible to show modal dialogs from the event dispatching thread because the toolkit will ensure that another event pump runs while the one which invoked this method is blocked.
hide
@Deprecated public void hide()
setVisible(boolean).show to return if it is currently blocked.toBack
public void toBack()
Places this Window at the bottom of the stacking order and shows it behind any other Windows in this VM. No action will take place is this Window is not visible. Some platforms do not allow Windows which are owned by other Windows to appear below their owners. Every attempt will be made to move this Window as low as possible in the stacking order; however, developers should not assume that this method will move this Window below all other windows in every situation.
Because of variations in native windowing systems, no guarantees about changes to the focused and active Windows can be made. Developers must never assume that this Window is no longer the focused or active Window until this Window receives a WINDOW_LOST_FOCUS or WINDOW_DEACTIVATED event. On platforms where the top-most window is the focused window, this method will probably cause this Window to lose focus. In that case, the next highest, focusable Window in this VM will receive focus. On platforms where the stacking order does not typically affect the focused window, this method will probably leave the focused and active Windows unchanged.
If this dialog is modal and blocks some windows, then all of them are also sent to the back to keep them below the blocking dialog.
isResizable
public boolean isResizable()
- Returns:
- 
trueif the user can resize the dialog;falseotherwise.
- See Also:
setResizable
public void setResizable(boolean resizable)
- Parameters:
- 
resizable-trueif the user can resize this dialog;falseotherwise.
- See Also:
setUndecorated
public void setUndecorated(boolean undecorated)
 This method can only be called while the dialog is not displayable. To make this dialog decorated, it must be opaque and have the default shape, otherwise the IllegalComponentStateException will be thrown. Refer to Window.setShape(java.awt.Shape), Window.setOpacity(float) and Window.setBackground(java.awt.Color) for details
- Parameters:
- 
undecorated-trueif no dialog decorations are to be enabled;falseif dialog decorations are to be enabled
- Throws:
- 
IllegalComponentStateException- if the dialog is displayable
- 
IllegalComponentStateException- ifundecoratedisfalse, and this dialog does not have the default shape
- 
IllegalComponentStateException- ifundecoratedisfalse, and this dialog opacity is less than1.0f
- 
IllegalComponentStateException- ifundecoratedisfalse, and the alpha value of this dialog background color is less than1.0f
- Since:
- 1.4
- See Also:
isUndecorated
public boolean isUndecorated()
- Returns:
- 
trueif dialog is undecorated;falseotherwise.
- Since:
- 1.4
- See Also:
paramString
protected String paramString()
null.- Overrides:
- 
paramStringin classContainer
- Returns:
- the parameter string of this dialog window.
getAccessibleContext
public AccessibleContext getAccessibleContext()
- Specified by:
- 
getAccessibleContextin interfaceAccessible
- Overrides:
- 
getAccessibleContextin classWindow
- Returns:
- an AccessibleAWTDialog that serves as the AccessibleContext of this Dialog
- Since:
- 1.3
    © 1993, 2021, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
    https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/Dialog.html
  
setVisible(boolean).