Java JOptionPane Error errMsg(final String msg)

Here you can find the source of errMsg(final String msg)

Description

Error message dialog

License

Open Source License

Parameter

Parameter Description
msg a parameter

Declaration

public static void errMsg(final String msg) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;

public class Main {
    /**/*from  w w w  .ja v a  2s  .co  m*/
     * Error message dialog
     * 
     * @param msg
     */
    public static void errMsg(final String msg) {
        // Show it in a message box
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                JOptionPane.showMessageDialog(null, msg, "Error", JOptionPane.ERROR_MESSAGE);
                System.out.println(msg);
            }
        });
    }
}

Related

  1. displayErrorMessage(final Throwable throwable, final Component parentComponent)
  2. displayErrorMessage(String msg, Throwable t)
  3. displayErrors(Component parent, List errors)
  4. errMsg(Component owner, String msg, Exception e)
  5. errMsg(final Component owner, final String msg, final Throwable e)
  6. errMsg(String msg)
  7. error(Component comp, String title, String message, Object[] args)
  8. error(Component parent, Exception e)
  9. error(Component parent, String message)