Java JOptionPane Error logErrorMessage(String msg)

Here you can find the source of logErrorMessage(String msg)

Description

log Error Message

License

Open Source License

Declaration

public static void logErrorMessage(String msg) 

Method Source Code


//package com.java2s;
//License from project: GNU General Public License 

import javax.swing.*;

public class Main {
    private static java.util.logging.Logger logger = java.util.logging.Logger.getLogger("idepix");

    public static void logErrorMessage(String msg) {
        if (System.getProperty("gpfMode") != null && "GUI".equals(System.getProperty("gpfMode"))) {
            JOptionPane.showOptionDialog(null, msg, "IDEPIX - Error Message", JOptionPane.DEFAULT_OPTION,
                    JOptionPane.ERROR_MESSAGE, null, null, null);
        } else {/*from   ww  w.  ja  v  a2s  . com*/
            info(msg);
        }
    }

    public static void info(final String msg) {
        logger.info(msg);
        System.out.println(msg);
    }
}

Related

  1. errorMessage(Component parent, Throwable t)
  2. errorMessage(Exception exceptionMsg, boolean quiet)
  3. exibeMsgErro(String msg)
  4. getIconError()
  5. guiError(String errormsg, String errortitle)
  6. popupError(String s, Throwable e)
  7. printErrorMessageAndExit(String message)
  8. showAudioNotAvailableError(String macId)
  9. showBlockedErrorMsg(final Container parent, final String message, final boolean exit)