浏览代码

Don't use the default request processor

Toni Helenius 3 年之前
父节点
当前提交
1aab34f017
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      jme3-core/src/com/jme3/gde/core/util/notify/NotifyUtil.java

+ 3 - 1
jme3-core/src/com/jme3/gde/core/util/notify/NotifyUtil.java

@@ -46,6 +46,8 @@ import org.openide.util.RequestProcessor;
  * @author qbeukes.blogspot.com, used by metalklesk
  */
 public class NotifyUtil {
+    
+    private static final RequestProcessor requestProcessor = new RequestProcessor("Notification processor", 1);
 
     private NotifyUtil() {
     }
@@ -62,7 +64,7 @@ public class NotifyUtil {
         }
         final Notification n = NotificationDisplayer.getDefault().notify(title, type.getIcon(), message, actionListener);
         if (timeout > 0) {
-            RequestProcessor.getDefault().post(new Runnable() {
+            requestProcessor.post(new Runnable() {
                 @Override
                 public void run() {
                     n.clear();