public class ConfirmDialog
extends java.lang.Object
This class provides a confirm dialog implementing the same look and feel as the other components.
It uses JOptionPane to create the dialog.
| Modifier and Type | Field and Description |
|---|---|
private static int |
result |
| Constructor and Description |
|---|
ConfirmDialog() |
| Modifier and Type | Method and Description |
|---|---|
private static void |
closeDialog(java.awt.event.ActionEvent e)
Close the dialog after a button has been pressed.
|
static int |
confirm(javax.swing.JFrame parent,
java.lang.String message,
java.lang.String title)
Creates a new confirm dialog with a YES button and a NO button.
|
public static int confirm(javax.swing.JFrame parent,
java.lang.String message,
java.lang.String title)
Creates a new confirm dialog with a YES button and a NO button.
Returns a result value, according to the user’s action:
JOptionPane.YES_OPTION.JOptionPane.NO_OPTION.JOptionPane.CANCEL_OPTION.parent - the parent framemessage - the question to be askedtitle - the window titleprivate static void closeDialog(java.awt.event.ActionEvent e)
Close the dialog after a button has been pressed.
e - action event created by pressing the button