Javatpoint Logo
Javatpoint Logo

Java JDialog

The JDialog control represents a top level window with a border and a title used to take some form of input from the user. It inherits the Dialog class.

Unlike JFrame, it doesn't have maximize and minimize buttons.

JDialog class declaration

Let's see the declaration for javax.swing.JDialog class.

Commonly used Constructors:

Constructor Description
JDialog() It is used to create a modeless dialog without a title and without a specified Frame owner.
JDialog(Frame owner) It is used to create a modeless dialog with specified Frame as its owner and an empty title.
JDialog(Frame owner, String title, boolean modal) It is used to create a dialog with the specified title, owner Frame and modality.

Java JDialog Example

Output:

Java Jdialog 1
Next TopicJava JPanel




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


B.Tech / MCA