Java javax.swing JDialog fields, constructors, methods, implement or subclass

Example usage for Java javax.swing JDialog fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.swing JDialog.

The text is from its open source code.

Subclass

javax.swing.JDialog has subclasses.
Click this link to see all its subclasses.

Constructor

JDialog(Frame owner, boolean modal)
Creates a dialog with an empty title and the specified modality and Frame as its owner.
JDialog(Frame owner, String title)
Creates a modeless dialog with the specified title and with the specified owner frame.
JDialog(Dialog owner, boolean modal)
Creates a dialog with an empty title and the specified modality and Dialog as its owner.
JDialog(Dialog owner, String title)
Creates a modeless dialog with the specified title and with the specified owner dialog.
JDialog(Window owner, ModalityType modalityType)
Creates a dialog with an empty title and the specified modality and Window as its owner.
JDialog(Window owner, String title)
Creates a modeless dialog with the specified title and owner Window .
JDialog()
Creates a modeless dialog without a title and without a specified Frame owner.
JDialog(Frame owner, String title, boolean modal)
Creates a dialog with the specified title, owner Frame and modality.
JDialog(Dialog owner, String title, boolean modal)
Creates a dialog with the specified title, modality and the specified owner Dialog .
JDialog(Window owner, String title, Dialog.ModalityType modalityType)
Creates a dialog with the specified title, owner Window and modality.
JDialog(Frame owner)
Creates a modeless dialog with the specified Frame as its owner and an empty title.
JDialog(Dialog owner)
Creates a modeless dialog with the specified Dialog as its owner and an empty title.
JDialog(Window owner)
Creates a modeless dialog with the specified Window as its owner and an empty title.

Method

Componentadd(Component comp)
Appends the specified component to the end of this container.
Componentadd(String name, Component comp)
Adds the specified component to this container.
voidaddComponentListener(ComponentListener l)
Adds the specified component listener to receive component events from this component.
voidaddFocusListener(FocusListener l)
Adds the specified focus listener to receive focus events from this component when this component gains input focus.
voidaddPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list.
voidaddWindowFocusListener(WindowFocusListener l)
Adds the specified window focus listener to receive window events from this window.
voidaddWindowListener(WindowListener l)
Adds the specified window listener to receive window events from this window.
voiddispatchEvent(AWTEvent e)
Dispatches an event to this component or one of its sub components.
voiddispose()
Releases all of the native screen resources used by this Window , its subcomponents, and all of its owned children.
RectanglegetBounds()
Gets the bounds of this component in the form of a Rectangle object.
intgetComponentCount()
Gets the number of components in this panel.
Component[]getComponents()
Gets all the components in this container.
ContainergetContentPane()
Returns the contentPane object for this dialog.
intgetDefaultCloseOperation()
Returns the operation which occurs when the user initiates a "close" on this dialog.
ComponentgetGlassPane()
Returns the glassPane object for this dialog.
intgetHeight()
Returns the current height of this component.
PointgetLocation()
Gets the location of this component in the form of a point specifying the component's top-left corner.
DimensiongetMinimumSize()
Returns the minimum size of this container.
WindowgetOwner()
Returns the owner of this window.
ContainergetParent()
Gets the parent of this component.
DimensiongetPreferredSize()
Returns the preferred size of this container.
JRootPanegetRootPane()
Returns the rootPane object for this dialog.
DimensiongetSize()
Returns the size of this component in the form of a Dimension object.
StringgetTitle()
Gets the title of the dialog.
intgetWidth()
Returns the current width of this component.
intgetX()
Returns the current x coordinate of the components origin.
intgetY()
Returns the current y coordinate of the components origin.
voidinvalidate()
Invalidates the container.
booleanisDefaultLookAndFeelDecorated()
Returns true if newly created JDialog s should have their Window decorations provided by the current look and feel.
booleanisDisplayable()
Determines whether this component is displayable.
booleanisFocused()
Returns whether this Window is focused.
booleanisResizable()
Indicates whether this dialog is resizable by the user.
booleanisVisible()
Determines whether this component should be visible when its parent is visible.
voidpack()
Causes this Window to be sized to fit the preferred size and layouts of its subcomponents.
voidrepaint()
Repaints this component.
voidrequestFocus()
Requests that this Component get the input focus, and that this Component's top-level ancestor become the focused Window.
voidsetAlwaysOnTop(boolean alwaysOnTop)
Sets whether this window should always be above other windows.
voidsetBackground(Color bgColor)
voidsetBounds(int x, int y, int width, int height)

The width or height values are automatically enlarged if either is less than the minimum size as specified by previous call to setMinimumSize .

voidsetBounds(Rectangle r)

The r.width or r.height values will be automatically enlarged if either is less than the minimum size as specified by previous call to setMinimumSize .

voidsetComponentOrientation(ComponentOrientation o)
Sets the language-sensitive orientation that is to be used to order the elements or text within this component.
voidsetContentPane(Container contentPane)
Sets the contentPane property.
voidsetDefaultCloseOperation(int operation)
Sets the operation that will happen by default when the user initiates a "close" on this dialog.
voidsetDefaultLookAndFeelDecorated(boolean defaultLookAndFeelDecorated)
Provides a hint as to whether or not newly created JDialog s should have their Window decorations (such as borders, widgets to close the window, title...) provided by the current look and feel.
voidsetEnabled(boolean b)
Enables or disables this component, depending on the value of the parameter b .
voidsetFocusableWindowState(boolean focusableWindowState)
Sets whether this Window can become the focused Window if it meets the other requirements outlined in isFocusableWindow .
voidsetFont(Font f)
Sets the font of this container.
voidsetGlassPane(Component glassPane)
Sets the glassPane property.
voidsetIconImage(Image image)
Sets the image to be displayed as the icon for this window.
voidsetIconImages(java.util.List icons)
Sets the sequence of images to be displayed as the icon for this window.
voidsetJMenuBar(final JMenuBar menu)
Sets the menubar for this dialog.
voidsetLayout(LayoutManager manager)
Sets the LayoutManager .
voidsetLocale(Locale l)
Sets the locale of this component.
voidsetLocation(int x, int y)

The method changes the geometry-related data.

voidsetLocation(Point p)

The method changes the geometry-related data.

voidsetLocationByPlatform(boolean locationByPlatform)
Sets whether this Window should appear at the default location for the native windowing system or at the current location (returned by getLocation ) the next time the Window is made visible.
voidsetLocationRelativeTo(Component c)
Sets the location of the window relative to the specified component according to the following scenarios.
voidsetMaximumSize(Dimension maximumSize)
Sets the maximum size of this component to a constant value.
voidsetMinimumSize(Dimension minimumSize)
Sets the minimum size of this window to a constant value.
voidsetModal(boolean modal)
Specifies whether this dialog should be modal.
voidsetModalityType(ModalityType type)
Sets the modality type for this dialog.
voidsetName(String name)
Sets the name of the component to the specified string.
voidsetOpacity(float opacity)
voidsetPreferredSize(Dimension preferredSize)
Sets the preferred size of this component to a constant value.
voidsetResizable(boolean resizable)
Sets whether this dialog is resizable by the user.
voidsetSize(int width, int height)

The width and height values are automatically enlarged if either is less than the minimum size as specified by previous call to setMinimumSize .

voidsetSize(Dimension d)

The d.width and d.height values are automatically enlarged if either is less than the minimum size as specified by previous call to setMinimumSize .

voidsetTitle(String title)
Sets the title of the Dialog.
voidsetUndecorated(boolean undecorated)
Disables or enables decorations for this dialog.
voidsetVisible(boolean b)
Shows or hides this Dialog depending on the value of parameter b .
voidshow()
Makes the Dialog visible.
voidtoFront()
If this Window is visible, brings this Window to the front and may make it the focused Window.
StringtoString()
Returns a string representation of this component and its values.
voidvalidate()
Validates this container and all of its subcomponents.