Here you can find the source of error(Exception ex)
public static void error(Exception ex)
//package com.java2s; //License from project: Open Source License import javax.swing.JOptionPane; public class Main { public static void error(Exception ex) { ex.printStackTrace(System.err); JOptionPane.showMessageDialog(null, "" + ex.getClass().getSimpleName() + ": " + ex.getMessage()); }/* w w w .j a va2 s .com*/ }