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.
Let's see the declaration for javax.swing.JDialog class.
| 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. |
Output:

We request you to subscribe our newsletter for upcoming updates.