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..8505af5ed8 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 @@ -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);