Here you can find the source of simpleError(Exception e, Component parent)
public static void simpleError(Exception e, Component parent)
//package com.java2s; /*// ww w .j av a 2 s . c om * Copyright ? 2014 - 2016 | Wurst-Imperium | All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import java.awt.Component; import java.io.PrintWriter; import java.io.StringWriter; import javax.swing.JOptionPane; public class Main { public static void simpleError(Exception e, Component parent) { StringWriter writer = new StringWriter(); e.printStackTrace(new PrintWriter(writer)); String message = writer.toString(); JOptionPane.showMessageDialog(parent, message, "Error", JOptionPane.ERROR_MESSAGE); } }