Here you can find the source of showExceptionMessage(Exception e)
public static void showExceptionMessage(Exception e)
//package com.java2s; //License from project: Open Source License import java.awt.Component; import javax.swing.JOptionPane; public class Main { private static Component mainComponent = null; public static void showExceptionMessage(Exception e) { String msg = "An exception has occurred.\n\n" + e.toString() + "\n\nIf problems persist, please contact your local administrator."; // log exception e.printStackTrace(System.out); JOptionPane.showMessageDialog(mainComponent, msg, "Exception", JOptionPane.ERROR_MESSAGE); }/*from w ww . j a v a 2 s .c o m*/ }