Here you can find the source of showException(String message, Exception ex)
public static void showException(String message, Exception ex)
//package com.java2s; import javax.swing.JOptionPane; public class Main { /**/*from w ww .ja v a 2 s. c o m*/ * Presents a modal dialog displaying the given message and information * about the given exception. Also prints a stack trace to stderr. */ public static void showException(String message, Exception ex) { ex.printStackTrace(); JOptionPane.showMessageDialog(null, message + "\n\n" + ex + "\n"); } }