Here you can find the source of showBlockedErrorMsg(final Container parent, final String message, final boolean exit)
public static void showBlockedErrorMsg(final Container parent, final String message, final boolean exit) throws HeadlessException
//package com.java2s; //License from project: Apache License import java.awt.Container; import java.awt.HeadlessException; import javax.swing.JOptionPane; import javax.swing.UIManager; public class Main { public static void showBlockedErrorMsg(final Container parent, final String message, final boolean exit) throws HeadlessException { JOptionPane.showMessageDialog(parent, message, UIManager.getString("OptionPane.messageDialogTitle"), JOptionPane.ERROR_MESSAGE); if (exit) { System.exit(-1);/* w w w .j av a 2 s .c o m*/ } } }