From 2bf1b599c251438c912dd91d8917a952c8ea15c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Wed, 9 Feb 2022 14:10:57 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-66167=20=E8=A7=A3=E5=86=B3=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E6=A0=8F=E6=9C=89=E6=97=B6=E5=80=99=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=9F=90=E4=BA=9B=E5=9B=BE=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/FormParaWidgetPane.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormParaWidgetPane.java b/designer-form/src/main/java/com/fr/design/mainframe/FormParaWidgetPane.java index be752777b7..9eb11607c6 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormParaWidgetPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormParaWidgetPane.java @@ -41,10 +41,6 @@ import javax.swing.JComponent; import javax.swing.JPanel; import javax.swing.JSeparator; import javax.swing.SwingConstants; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Cursor; @@ -55,6 +51,10 @@ import java.awt.event.ComponentEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; /** * @author null @@ -196,7 +196,9 @@ public class FormParaWidgetPane extends JPanel { JPanel componentsPara = new JPanel(new FlowLayout(FlowLayout.LEFT)); WidgetOption[] chartOptions = loadChartOptions(); for (WidgetOption chartOption : chartOptions) { - componentsPara.add(new ToolBarButton(chartOption)); + ToolBarButton button = new ToolBarButton(chartOption); + button.setPreferredSize(new Dimension(widgetButtonWidth, widgetButtonHeight)); + componentsPara.add(button); } int x = COMMON_CHAR_NUM * (widgetButtonWidth + smallGAP); int y = (int) Math.ceil(chartOptions.length / ((double) COMMON_CHAR_NUM)) * (widgetButtonHeight + smallGAP);