When I create a new JPanel and set the GridbagLayoutManager I start with:
GridBagLayout gridBagLayout = new GridBagLayout();
gridBagLayout.columnWidths = new int[]{0};
gridBagLayout.rowHeights = new int[]{0};
gridBagLayout.columnWeights = new double[]{1.0E-4};
gridBagLayout.rowWeights = new double[]{1.0E-4};
setLayout(gridBagLayout);
one row and one column with a dummy width!
In the following I focus on the columns.
I add one JPanel and obtain:
gridBagLayout.columnWidths = new int[]{0, 0};
gridBagLayout.columnWeights = new double[]{1.0, 1.0E-4};
2 columns, one with a dummy weight.
I add a second JPanel resulting in another column:
gridBagLayout.columnWidths = new int[]{0, 0, 0};
gridBagLayout.columnWeights = new double[]{1.0, 1.0, 1.0E-4};
3 columns, one with the dummy weight.
1 Delete the second JPanel
gridBagLayout.columnWidths = new int[]{0, 0, 0};
gridBagLayout.columnWeights = new double[]{1.0, 1.0, 1.0E-4};
3 columns , one with the dummy weight.
I expected 2 columns
How can I change the column count within the Design Page?
The same for rows...