* @throws OutputException For errors loading resources.
*/
protected PreviewDialog createPreviewDialog(final AWTRenderer renderer, final Translator res)
throws OutputException {
final PreviewDialog frame = new PreviewDialog(renderer, res);
frame.validate();
frame.addWindowListener(new WindowAdapter() {
public void windowClosed(final WindowEvent we) {
/* Checkstyle-GenericIllegalRegexp-Off. */
/* TODO: Is there a better way to handle this? */
System.exit(0);