From f9e58113c1001e09ca11966949a8653ccbeb42f7 Mon Sep 17 00:00:00 2001 From: shine Date: Thu, 16 Jan 2020 09:51:35 +0800 Subject: [PATCH] update --- .../java/com/fr/design/gui/controlpane/UIControlPane.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java index b41e4283f..747dbe32f 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java @@ -29,6 +29,7 @@ import java.awt.Cursor; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; +import java.awt.Frame; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.GraphicsEnvironment; @@ -248,8 +249,8 @@ abstract class UIControlPane extends JControlPane { try { //没有指定owner的弹出框用的是SwingUtilities.getSharedOwnerFrame() - Window sharedWindow = Reflect.on(SwingUtilities.class).call("getSharedOwnerFrame").get(); - for (Window window : sharedWindow.getOwnedWindows()) { + Frame sharedOwnerFrame = Reflect.on(SwingUtilities.class).call("getSharedOwnerFrame").get(); + for (Window window : sharedOwnerFrame.getOwnedWindows()) { if (window instanceof JDialog && window.isVisible() && ((JDialog) window).isModal()) { // 如果有可见模态对话框,则不隐藏 return;