From 15356ec44b958fb01ecfdf977b5620066654b428 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Wed, 11 Jan 2017 10:50:43 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-576=20font=E4=BB=A3=E7=A0=81=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/designer/creator/cardlayout/XCardSwitchButton.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 6baa740947..31c45681da 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -31,7 +31,6 @@ import com.fr.form.ui.container.cardlayout.WTabFitLayout; import com.fr.general.Background; import com.fr.general.FRFont; import com.fr.general.Inter; -import sun.font.FontDesignMetrics; /** * @@ -354,7 +353,7 @@ public class XCardSwitchButton extends XButton { CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); String tempText = tempCard.getText(); Font f = ((CardSwitchButton)this.toData()).getFont(); - FontMetrics fm = FontDesignMetrics.getMetrics(f); + FontMetrics fm = Toolkit.getDefaultToolkit().getFontMetrics(f); cardWidth.put(i,fm.stringWidth(tempText)); cardHeight.put(i,fm.getHeight()); }