diff --git a/designer-base/src/main/java/com/fr/design/dialog/InformationWarnPane.java b/designer-base/src/main/java/com/fr/design/dialog/InformationWarnPane.java index aac7461c33..e64133eea4 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/InformationWarnPane.java +++ b/designer-base/src/main/java/com/fr/design/dialog/InformationWarnPane.java @@ -37,6 +37,17 @@ public class InformationWarnPane extends JPanel{ public void show() { showWindow(SwingUtilities.getWindowAncestor(this)).setVisible(true); } + + public void showOnFront() { + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + AlertDialog dialog = showWindow(SwingUtilities.getWindowAncestor(InformationWarnPane.this)); + dialog.setVisible(true); + dialog.toFront(); + } + }); + } public InformationWarnPane(String infor, String moreInfo, String title) { this.title = title; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 2975eaca43..6e8b020007 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -1096,7 +1096,7 @@ public abstract class JTemplate> String info = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Open-New_Form_Tip"); String moreInfo = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Server_Version_Tip_More_Info"); if (showTipPane) { - new InformationWarnPane(info, moreInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")).show(); + new InformationWarnPane(info, moreInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")).showOnFront(); } return true; } @@ -1119,7 +1119,7 @@ public abstract class JTemplate> String infor = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Template_Version_Not_Match", DesignUtils.parseVersion(xmlDesignerVersion)); String moreInfo = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Server_Version_Tip_More_Info"); if (showTipPane) { - new InformationWarnPane(infor, moreInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")).show(); + new InformationWarnPane(infor, moreInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")).showOnFront(); } return true; }