Here you can find the source of error(Component parent, Exception e)
static void error(Component parent, Exception e)
//package com.java2s; //License from project: Apache License import javax.swing.*; import java.awt.*; public class Main { static void error(Component parent, String message) { JOptionPane.showMessageDialog(parent, message, "Error", JOptionPane.ERROR_MESSAGE); }//from w w w . j av a 2 s. c o m static void error(Component parent, Exception e) { e.printStackTrace(); error(parent, e.toString()); } }