This chapter covers each Layout in detail. For an explanation of
how Layouts fit into the overall architecture of Metawidget, see
Chapter 2, Architecture.
Layout to simply output components one after another, with no labels and no structure, using
javax.swing.BoxLayout. This is like FlowLayout (below), except it fills width.
It can be useful for JTable CellEditors.
Layout to simply output components one after another, with no labels and no structure,
using javax.awt.FlowLayout.
Layout to arrange widgets using javax.awt.GridBagLayout. Widgets are arranged in a table,
with one column for labels and another for the widget.
This Layout recognizes the following parameters, configured
using GridBagLayoutConfig:
| Property | Description |
|---|---|
numberOfColumns |
number of columns. Each label/component pair is considered one column |
labelAlignment |
Such as SwingConstants.LEFT or SwingConstants.RIGHT |
sectionStyle |
Either GridBagLayoutConfig.SECTION_AS_HEADING or GridBagLayoutConfig.SECTION_AS_TAB |
labelSuffix |
Text to display after label text. Defaults to a colon (:) |
requiredAlignment |
Such as SwingConstants.LEFT or SwingConstants.RIGHT |
requiredText |
Text to display for required fields. Defaults to a star (*) |
Layout to arrange widgets using javax.swing.GroupLayout.
Widgets are arranged in a table, with one column for labels and another for the widget.
Layout to arrange widgets using net.miginfocom.swing.MigLayout. Widgets are arranged in a table,
with one column for labels and another for the widget.
This Layout recognizes the following parameters, configured
using MigLayoutConfig:
| Property | Description |
|---|---|
numberOfColumns |
number of columns. Each label/component pair is considered one column |
sectionStyle |
Either MigLayoutConfig.SECTION_AS_HEADING or MigLayoutConfig.SECTION_AS_TAB |