public class MessageBox
extends java.lang.Object
import jfx.messagebox.MessageBox;
MessageBox.show(primaryStage,
"Sample of error dialog.\n\nDialog option is below.\n[MessageBox.ICON_ERROR]",
"Error dialog",
MessageBox.ICON_ERROR);
import jfx.messagebox.MessageBox;
MessageBox.show(primaryStage,
"Sample of information dialog.\n\nDialog option is below.\n[MessageBox.ICON_INFORMATION | MessageBox.OK | MessageBox.CANCEL]",
"Information dialog",
MessageBox.ICON_INFORMATION | MessageBox.OK | MessageBox.CANCEL);
Modifier and Type | Field and Description |
---|---|
static int |
ABORT
Abort button.
|
static int |
CANCEL
Cancel button.
|
static int |
DEFAULT_BUTTON1
Set first button as default button.
|
static int |
DEFAULT_BUTTON2
Set second button as default button.
|
static int |
DEFAULT_BUTTON3
Set third button as default button.
|
static int |
DEFAULT_BUTTON4
Set fourth button as default button.
|
static int |
ICON_ERROR
Error icon.
|
static int |
ICON_INFORMATION
Information icon.
|
static int |
ICON_QUESTION
Question icon.
|
static int |
ICON_WARNING
Warning icon.
|
static int |
IGNORE
Ignore button.
|
static int |
NO
No button.
|
static int |
OK
OK button.
|
static int |
RETRY
Retry button.
|
static int |
YES
Yes button.
|
Modifier and Type | Method and Description |
---|---|
static int |
show(javafx.stage.Window parent,
java.lang.String message,
java.lang.String title,
int option)
Display MessageBox.
|
public static final int ICON_ERROR
public static final int ICON_WARNING
public static final int ICON_INFORMATION
public static final int ICON_QUESTION
public static final int OK
public static final int CANCEL
public static final int YES
public static final int NO
public static final int ABORT
public static final int RETRY
public static final int IGNORE
public static final int DEFAULT_BUTTON1
public static final int DEFAULT_BUTTON2
public static final int DEFAULT_BUTTON3
public static final int DEFAULT_BUTTON4
public static int show(javafx.stage.Window parent, java.lang.String message, java.lang.String title, int option)
parent
- Parent window object. If null was set, dialog may be modeless.message
- Message string for dialog.title
- Title string for dialog.option
- Display option. The option value is either one of the option
constants OR'ing together (using the int "|" operator) two or
more of those MessageBox option constants. ex.
MessageBox.ICON_INFORMATION | MessageBox.OK |
MessageBox.CANCEL