1 package com.nexuiz.demorecorder.ui.swinggui.utils;
\r
3 import java.awt.Component;
\r
4 import java.lang.Thread.UncaughtExceptionHandler;
\r
6 import org.jdesktop.swingx.JXErrorPane;
\r
7 import org.jdesktop.swingx.error.ErrorInfo;
\r
9 public class ShowErrorDialogExceptionHandler implements UncaughtExceptionHandler {
\r
11 private static Component parentWindow = null;
\r
13 public void uncaughtException(Thread t, Throwable e) {
\r
14 ErrorInfo info = new ErrorInfo("Error occurred", e.getMessage(), null, null, e, null, null);
\r
15 JXErrorPane.showDialog(parentWindow, info);
\r
18 public static void setParentWindow(Component c) {
\r