// TODO Replace by Font.MONOSPACED with JDK 6
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);
	}
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());
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();
}
};
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);
}