public void handle(Throwable e) {
    e.printStackTrace();
    
    JTextArea area = new JTextArea(10, 40);
    StringWriter writer = new StringWriter();
    e.printStackTrace(new PrintWriter(writer));
    area.setText(writer.toString());
    area.setCaretPosition(0);
    String copyOption = resources.getString("dialog.error.copy");
    JOptionPane pane = new JOptionPane(new JScrollPane(area), JOptionPane.ERROR_MESSAGE, JOptionPane.YES_NO_OPTION, null, new String[] { copyOption, resources.getString("cancel") });
    pane.createDialog(WorldFrame.this, e.toString()).setVisible(true);
    if (copyOption.equals(pane.getValue())) {
        area.setSelectionStart(0);
        area.setSelectionEnd(area.getText().length());
        area.copy(); // copy to clipboard
    }
}