Java Utililty Methods JOptionPane Message

List of utility methods to do JOptionPane Message

Description

The list of methods to do JOptionPane Message are organized into topic(s).

Method

voidshowMessage(final Window aParent, final String aMessage)
Convenience method to show a (information) message.
JOptionPane.showMessageDialog(aParent, aMessage);
voidshowMessage(final Window parent, final String message, final String title, final int messageType)
show Message
runInSwingThread(new Runnable() {
    @Override
    public void run() {
        JOptionPane.showMessageDialog(parent, message, title, messageType);
});
voidshowMessage(Object message)
show Message
JOptionPane pane = new JOptionPane(message, JOptionPane.WARNING_MESSAGE);
JDialog dialog2 = pane.createDialog(null, "Message");
dialog2.setAlwaysOnTop(true);
dialog2.setVisible(true);
voidshowMessage(String message)
Display a sample message in a dialog box.
JOptionPane.showMessageDialog(null, message, 
        "utils.message", JOptionPane.INFORMATION_MESSAGE);
voidshowMessage(String message)
Shows a popup alert to the user
JOptionPane.showMessageDialog(null, message);
voidshowMessage(String message, String title)
Display a simple message in a dialog box, with the specified title.
JOptionPane.showMessageDialog(null, message, title, JOptionPane.INFORMATION_MESSAGE);
voidshowMessage(String message, String title)
show Message
JOptionPane.showMessageDialog(frame, message, title, JOptionPane.PLAIN_MESSAGE);
voidshowMessage(String msg)
show Message
showMessage(msg, "");
voidshowMessage(String msg)
Displays a message in a dialog box.
try {
    JFrame f = new JFrame();
    JOptionPane.showMessageDialog(f, msg, "Repast Message", JOptionPane.INFORMATION_MESSAGE);
    f.dispose();
} catch (InternalError ex) {
    System.out.println("Repast Message: " + msg);
voidshowMessage(String msg)
show Message
JOptionPane.showMessageDialog(null, msg);