List of utility methods to do JOptionPane Message
void | showSuccessMessage(Component parentComponent, String message) show Success Message showSuccessMessage(parentComponent, message, "Success");
|
boolean | showYesNo(Component parent, String title, String message) show Yes No int IGNORED = -1; Object no = "No"; Object yes = "Yes"; Object arr[]; arr = new Object[2]; arr[0] = no; arr[1] = yes; JOptionPane p; ... |
int | showYesNoCancel_old(Component parent, String title, String message) This works fine except that the YES button is initially selected and is also the default button. return JOptionPane.showConfirmDialog(parent, message, title, JOptionPane.YES_NO_CANCEL_OPTION);
|
boolean | showYesNoMessage(Component parent, String message) show Yes No Message return JOptionPane.showConfirmDialog(parent, message, "Warning", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION; |
String | testInput(String message) test Input return JOptionPane.showInputDialog(null, message, "Test", JOptionPane.PLAIN_MESSAGE); |
boolean | yesNo(Component parent, String message, String title) yes No return 0 == JOptionPane.showConfirmDialog(parent, message, title, JOptionPane.YES_NO_OPTION);
|
boolean | yesTo(String message, Component parent) Displays a confirmation window asking a user a yes or no question. int c = JOptionPane.showConfirmDialog(parent, message, "Confirm", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); boolean out = c == JOptionPane.YES_OPTION; return out; |