List of utility methods to do JOptionPane Warning
void | displayWarning(String strMsg) display Warning displayMessageBox(strMsg, JOptionPane.WARNING_MESSAGE, false); |
void | displayWarningMessage(Component parentComponent, String message, String windowTitle) display Warning Message displayMessage(parentComponent, message, windowTitle, JOptionPane.WARNING_MESSAGE); |
Icon | getIconWarning() Retrieves the standard warning icon (the same one that JOptionPane uses). return UIManager.getIcon("OptionPane.warningIcon"); |
void | messageWarning(String s) message Warning JOptionPane.showMessageDialog(null, s, "Warning", JOptionPane.WARNING_MESSAGE);
|
void | messageWarning(String s) message Warning JOptionPane.showMessageDialog(null, s, "Warning", JOptionPane.WARNING_MESSAGE);
|
void | popupMessage(String title, String message, @SuppressWarnings("SameParameterValue") int icon) Gives a popup to the user. Canvas frame = new Canvas();
JOptionPane.showMessageDialog(frame, message, title, icon);
|
String | popupPrompt(String title, String message, @SuppressWarnings("SameParameterValue") String[] choices, String defaultOption) Allows the user to choose from a series of choices. ImageIcon icon = new ImageIcon(); Canvas frame = new Canvas(); return (String) JOptionPane.showInputDialog(frame, message, title, JOptionPane.PLAIN_MESSAGE, icon, choices, defaultOption); |
int | showPrettyWarningPromptPane(Component caller, String msg) show Pretty Warning Prompt Pane Object[] options = { "OK", "Cancel" }; int response = JOptionPane.showOptionDialog(null, "<html><body><p syle='width: 200px;'>" + msg + "</p></body></html>", "Warning", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]); return response; |
void | showWarning(Component owner, String msg) Shows a warning dialog showWarning(owner, "Warning", msg);
|
void | showWarning(Component parent, String title, String message) show Warning JOptionPane.showMessageDialog(parent, message, title, JOptionPane.WARNING_MESSAGE); |