From 92b9f510ca3c0ce38d3f00d3db2a505e32b93e70 Mon Sep 17 00:00:00 2001 From: richie Date: Wed, 28 Aug 2019 13:39:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fanruan/api/design/ui/layout/TableLayoutKit.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/com/fanruan/api/design/ui/layout/TableLayoutKit.java b/src/main/java/com/fanruan/api/design/ui/layout/TableLayoutKit.java index f1d36de..6aaf056 100644 --- a/src/main/java/com/fanruan/api/design/ui/layout/TableLayoutKit.java +++ b/src/main/java/com/fanruan/api/design/ui/layout/TableLayoutKit.java @@ -11,6 +11,18 @@ import java.awt.*; * @version 10.0 * Created by richie on 2019-08-28 * 表格布局 + * + * double p = TableLayoutKit.PREFERRED; + * double f = TableLayoutKit.FILL; + * double[] rowSize = new double[]{p, p, p, f}; + * double[] columnSize = new double[]{p, f}; + * JComponent[][] comps = new JComponent[][]{ + * {new JLabel(), new JButton()}, + * {new JLabel(), new JButton()}, + * {new JLabel(), new JButton()} + * } + * JPanel = TableLayoutKit.createTableLayoutPane(comps, rowSize, columnSize); + * */ public class TableLayoutKit {