public static void main(String[] args) { // Generate an exception with a trace... try { String[] dummy = new String[0]; dummy[0].substring(0); // Will throw ArrayIndexOutOfBoundException } catch (RuntimeException re) { ExceptionDialog ed = new ExceptionDialog(re); ed.setVisible(true); } }
public void mouseClicked(MouseEvent e) { if (renderException != null) { int mx = e.getX(); if (mx > getWidth() - 100) { ExceptionDialog dialog = new ExceptionDialog(null, renderException); dialog.setModal(true); dialog.setVisible(true); } } }