List of utility methods to do JOptionPane Message
String | getStringInput(String message) get String Input String input; while (true) { input = (String) JOptionPane.showInputDialog(null, message, ""); if (input != null && input.trim().length() != 0) break; return input; |
String | getStrInPane(String message, String title) This method will display an input dialog box to receive a string of input from user return JOptionPane.showInputDialog(null, message, title, JOptionPane.QUESTION_MESSAGE);
|
String | getUserInputString(String message) Inputs Dialog to retrieve a parameter return JOptionPane.showInputDialog(message);
|
void | globalMessagebox(String body, String title, int icon) Makes sure that the message is visible no matter what (on any window) JFrame fullscreen = new JFrame();
Dimension size = Toolkit.getDefaultToolkit().getScreenSize();
fullscreen.setSize(size);
fullscreen.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(fullscreen, body, title, icon);
fullscreen.dispose();
fullscreen = null;
|
String | input(Component comp, String title, String message, Object def) Displays an input dialog box and returns any text the user entered. return input(comp, title, title, null, def);
|
String | input(String message, String title) input return JOptionPane.showInputDialog(null, message, title, JOptionPane.QUESTION_MESSAGE);
|
String | inputMessage(String str1) input Message return JOptionPane.showInputDialog(str1);
|
void | log(String msg) Writes a message to the log file. System.out.println(msg); if (logWriter != null && !loggingFailed) { try { logWriter.write(msg); logWriter.write('\n'); logWriter.flush(); } catch (IOException e) { e.printStackTrace(); ... |
void | message(Component comp, String title, String message) Displays a dialog box. JOptionPane.showMessageDialog(comp, message, title, JOptionPane.INFORMATION_MESSAGE); |
void | message(String s) message JOptionPane.showMessageDialog(null, s, "Message", JOptionPane.INFORMATION_MESSAGE);
|