private static void displayExceptionPrivate(JFrame aFrame, Throwable aE) {
		StringWriter tempStringWriter = new StringWriter();
		PrintWriter tempPrintWriter = new PrintWriter(tempStringWriter);
		aE.printStackTrace(tempPrintWriter);
		tempPrintWriter.close();
		final JDialog tempDialog = new JDialog(aFrame, "Error: " + aE.getMessage());
		tempDialog.setModal(true);
		Dimension tempScreen = Toolkit.getDefaultToolkit().getScreenSize();
		tempDialog.setSize(tempScreen.width / 2, tempScreen.height / 2);
		tempDialog.setLocation(tempScreen.width / 4, tempScreen.height / 4);
		tempDialog.getContentPane().setLayout(new BorderLayout());
		ScrollPane tempScrollPane = new ScrollPane();
		JEditorPane tempEditorPane = new JEditorPane();
		// TODO Replace by Font.MONOSPACED with JDK 6
		tempEditorPane.setFont(new Font("Monospaced", 0, aFrame.getFont().getSize()));
		tempEditorPane.setText(tempStringWriter.toString());
		tempScrollPane.add(tempEditorPane);
		tempDialog.getContentPane().add(tempScrollPane, BorderLayout.CENTER);
		Action tempActionListener = new AbstractAction("OK") {
			@Override
			public void actionPerformed(ActionEvent aE) {
				tempDialog.dispose();
			}
		};
		tempDialog.getContentPane().add(createButtons(new Action[] { tempActionListener }), BorderLayout.SOUTH);
		tempDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		tempDialog.setVisible(true);
	}
private static void displayExceptionPrivate(JFrame aFrame, Throwable aE) {
		StringWriter tempStringWriter = new StringWriter();
		PrintWriter tempPrintWriter = new PrintWriter(tempStringWriter);
		aE.printStackTrace(tempPrintWriter);
		tempPrintWriter.close();
		final JDialog tempDialog = new JDialog(aFrame, "Error: " + aE.getMessage());
		tempDialog.setModal(true);
		Dimension tempScreen = Toolkit.getDefaultToolkit().getScreenSize();
		tempDialog.setSize(tempScreen.width / 2, tempScreen.height / 2);
		tempDialog.setLocation(tempScreen.width / 4, tempScreen.height / 4);
		tempDialog.getContentPane().setLayout(new BorderLayout());
		ScrollPane tempScrollPane = new ScrollPane();
		JEditorPane tempEditorPane = new JEditorPane();
	
		tempEditorPane.setFont(new Font("Monospaced", 0, aFrame.getFont().getSize()));
		tempEditorPane.setText(tempStringWriter.toString());
		tempScrollPane.add(tempEditorPane);
		tempDialog.getContentPane().add(tempScrollPane, BorderLayout.CENTER);
		Action tempActionListener = new AbstractAction("OK") {
			@Override
			public void actionPerformed(ActionEvent aE) {
				tempDialog.dispose();
			}
		};
		tempDialog.getContentPane().add(createButtons(new Action[] { tempActionListener }), BorderLayout.SOUTH);
		tempDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		tempDialog.setVisible(true);
	}
private static void displayexceptionprivate(jframe aframe, throwable ae) { stringwriter tempstringwriter = new stringwriter(); printwriter tempprintwriter = new printwriter(tempstringwriter); ae.printstacktrace(tempprintwriter); tempprintwriter.close(); final jdialog tempdialog = new jdialog(aframe, "error: " + ae.getmessage()); tempdialog.setmodal(true); dimension tempscreen = toolkit.getdefaulttoolkit().getscreensize(); tempdialog.setsize(tempscreen.width / 2, tempscreen.height / 2); tempdialog.setlocation(tempscreen.width / 4, tempscreen.height / 4); tempdialog.getcontentpane().setlayout(new borderlayout()); scrollpane tempscrollpane = new scrollpane(); jeditorpane tempeditorpane = new jeditorpane(); tempeditorpane.setfont(new font("monospaced", 0, aframe.getfont().getsize())); tempeditorpane.settext(tempstringwriter.tostring()); tempscrollpane.add(tempeditorpane); tempdialog.getcontentpane().add(tempscrollpane, borderlayout.center); action tempactionlistener = new abstractaction("ok") { @override public void actionperformed(actionevent ae) { tempdialog.dispose(); } }; tempdialog.getcontentpane().add(createbuttons(new action[] { tempactionlistener }), borderlayout.south); tempdialog.setdefaultcloseoperation(jdialog.dispose_on_close); tempdialog.setvisible(true); }