Here you can find the source of showError(Component parentComponent, Exception e)
public static void showError(Component parentComponent, Exception e)
//package com.java2s; //License from project: Open Source License import java.awt.Component; import java.io.PrintWriter; import java.io.StringWriter; import javax.swing.JOptionPane; public class Main { public static void showError(Component parentComponent, Exception e) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw);/*w w w. j a va 2 s . com*/ JOptionPane.showMessageDialog(parentComponent, sw.toString()); } }