Java JOptionPane Message showMsg(final Container parent, final String message)

Here you can find the source of showMsg(final Container parent, final String message)

Description

show Msg

License

Apache License

Declaration

public static void showMsg(final Container parent, final String message) throws HeadlessException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.awt.Container;

import java.awt.HeadlessException;

import javax.swing.JOptionPane;

import javax.swing.SwingUtilities;

import javax.swing.UIManager;

public class Main {
    public static void showMsg(final Container parent, final String message) throws HeadlessException {
        SwingUtilities.invokeLater(new Runnable() {

            @Override//from  w  w  w . ja va2 s. c  o  m
            public void run() {
                JOptionPane.showMessageDialog(parent, message, UIManager.getString("OptionPane.messageDialogTitle"),
                        JOptionPane.INFORMATION_MESSAGE);
            }
        });
    }
}

Related

  1. showMessage(String msg)
  2. showMessage(String title, String message)
  3. showMessage(String title, String message, java.awt.Component parent)
  4. showMessageInEventQueue(final String message, final String title)
  5. showMessages(Component parent, List messages)
  6. ShowOkCancelMessage(String msg)
  7. ShowOkMessage(String msg)
  8. showPrettyYesNoPane(Component caller, String msg, String title)
  9. showQuestionThreeChoicesBox(Component pParent, String pMessage, String pTitle, String pLeftOption, String pMiddleOption, String pRightOption)