diff --git a/designer-base/src/main/java/com/fr/design/layout/FRGUIPaneFactory.java b/designer-base/src/main/java/com/fr/design/layout/FRGUIPaneFactory.java index 0c3a067a95..80efde739e 100644 --- a/designer-base/src/main/java/com/fr/design/layout/FRGUIPaneFactory.java +++ b/designer-base/src/main/java/com/fr/design/layout/FRGUIPaneFactory.java @@ -562,7 +562,7 @@ public class FRGUIPaneFactory { double n = (double)(width + WIDTH_OFFSET_N ) / (double)WIDTH_PARA_F; double i = Math.abs(((double) ((int) m + (int) (m + 1)) / WIDTHABS_PARA_F) - m); double j = Math.abs(((double) ((int) n + (int) (n + 1)) / WIDTHABS_PARA_F) - n); - double x = i > j ? i : j; + double x = Math.max(i,j); if (AssistUtils.equals(x, i)) { w = (int) (Math.round(m) * WIDTH_PARA_INT - WIDTH_OFFSET_M); } else if (AssistUtils.equals(x, j)) { diff --git a/designer-base/src/main/java/com/fr/design/layout/TableLayoutHelper.java b/designer-base/src/main/java/com/fr/design/layout/TableLayoutHelper.java index 1be77c8492..d394f43ee7 100644 --- a/designer-base/src/main/java/com/fr/design/layout/TableLayoutHelper.java +++ b/designer-base/src/main/java/com/fr/design/layout/TableLayoutHelper.java @@ -372,7 +372,8 @@ public class TableLayoutHelper { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; JPanel jp1 = TableLayoutHelper.createTableLayoutPane(createTestComponents("jp1"), TableLayoutHelper.FILL_NONE); - JPanel jp2 = TableLayoutHelper.createGapTableLayoutPane(createTestComponents("jp2"), TableLayoutHelper.FILL_LASTCOL_AND_ROW, (double)2 * TEN, (double)2 * TEN); + JPanel jp2 = TableLayoutHelper.createGapTableLayoutPane(createTestComponents("jp2"), + TableLayoutHelper.FILL_LASTCOL_AND_ROW, (double)2 * TEN, (double)2 * TEN); JPanel jp3 = TableLayoutHelper.createGapTableLayoutPane(createTestComponents("jp3"), new double[]{f, p, f, p}, new double[]{f, f}, 4, 4); JPanel jp4 = TableLayoutHelper.createGapTableLayoutPane(createTestComponents("jp4"),