From 6615f4c6ab01f0624afc28558efe84565072fc03 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 8 Jan 2020 15:20:53 +0800 Subject: [PATCH] REPORT-26091 && REPORT-26181 --- .../main/java/com/fr/design/dialog/FineJOptionPane.java | 3 ++- .../src/main/java/com/fr/design/webattr/WebJsPane.java | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/dialog/FineJOptionPane.java b/designer-base/src/main/java/com/fr/design/dialog/FineJOptionPane.java index 933f2c49b6..4a4424d9f5 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/FineJOptionPane.java +++ b/designer-base/src/main/java/com/fr/design/dialog/FineJOptionPane.java @@ -158,8 +158,9 @@ public class FineJOptionPane extends JOptionPane { public static int showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon) throws HeadlessException { + String[] options = OPTION_MAP.get(optionType); return showConfirmDialog(parentComponent, message, title, optionType, - messageType, icon, OPTION_MAP.get(optionType), null); + messageType, icon, options, options[0]); } /** diff --git a/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java b/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java index be404ac5d4..bf04e554f8 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java @@ -1,6 +1,7 @@ package com.fr.design.webattr; import com.fr.design.dialog.BasicPane; +import com.fr.design.dialog.FineJOptionPane; import com.fr.design.gui.frpane.EditingStringListPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIRadioButton; @@ -199,9 +200,12 @@ public class WebJsPane extends BasicPane { FineLoggerFactory.getLogger().error(e.getMessage(), e); } if (in == null) { - JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed")); + FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed"), + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Failed"), + JOptionPane.ERROR_MESSAGE); } else { - JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Connection_Successfully")); + FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Connection_Successfully")); try { in.close(); } catch (IOException e) {