diff --git a/designer-base/src/main/java/com/fr/design/carton/EventDispatchThreadHangMonitor.java b/designer-base/src/main/java/com/fr/design/carton/EventDispatchThreadHangMonitor.java index 118c0858ef..a7bf03b407 100644 --- a/designer-base/src/main/java/com/fr/design/carton/EventDispatchThreadHangMonitor.java +++ b/designer-base/src/main/java/com/fr/design/carton/EventDispatchThreadHangMonitor.java @@ -1,6 +1,7 @@ package com.fr.design.carton; import com.fr.concurrent.FineExecutors; +import com.fr.design.ui.util.UIUtil; import com.fr.json.JSONObject; import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; @@ -314,7 +315,7 @@ public final class EventDispatchThreadHangMonitor extends EventQueue { * 将swing中默认的EventQueue换成自己的 */ public static void initMonitoring() { - SwingUtilities.invokeLater(() -> Toolkit.getDefaultToolkit().getSystemEventQueue().push(INSTANCE)); + UIUtil.invokeLaterIfNeeded(() -> Toolkit.getDefaultToolkit().getSystemEventQueue().push(INSTANCE)); } /**