net.kolls.railworld
Class YesNoCancel
java.lang.Object
net.kolls.railworld.YesNoCancel
public class YesNoCancel
- extends java.lang.Object
Displays a JOptionPane dialog with three buttons: yes, no, and cancel.
However, the face of the buttons is given by the caller. The return values
follow the usual JOptionPane constants of YES_OPTION, NO_OPTION, and
CANCEL_OPTION.
- Author:
- Steve Kollmansberger
|
Method Summary |
static int |
showDialog(java.awt.Component parent,
java.lang.String message,
java.lang.String title,
java.lang.String yes,
java.lang.String no,
java.lang.String cancel)
Create a new dialog showing a yes, no, and cancel option with text
specified by the user. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
YesNoCancel
public YesNoCancel()
showDialog
public static int showDialog(java.awt.Component parent,
java.lang.String message,
java.lang.String title,
java.lang.String yes,
java.lang.String no,
java.lang.String cancel)
- Create a new dialog showing a yes, no, and cancel option with text
specified by the user.
- Parameters:
parent - The parent framemessage - The message to displaytitle - Title of the dialogyes - The text for the "yes" buttonno - The text for the "no" buttoncancel - The text for the "cancel" button
- Returns:
- A code indicating which button was selected;
JOptionPane.YES_OPTION,
JOptionPane.NO_OPTION, or JOptionPane.CANCEL_OPTION. If neither
button is clicked, the cancel value is returned. - See Also:
JOptionPane