Narrow Test

This page shows the effect of the JGoodies narrow button property, how to save screen white space, and how different layout managers handle narrow buttons.

For an introduction, see the launcher settings.

The page consists of three subpanels that use different layout managers, and each subpanel contains the same three button rows. The first row consists of buttons that have no narrow hint set. These buttons will use the default wide margin unless you switch on narrow buttons globally. In the second row the button with A Long Label has a narrow hint set. In the third row, all buttons are hinted to be narrow.

BoxLayout

BoxLayout does not modify button widths, and so, shows the raw widths. You can see the smaller button widths for narrow hinted buttons in the second and third line.

FormLayout

The FormLayout is used to equalize the width of the first four buttons and doesn't modify the width of the last button. This leads to a good layout compromise for the first and second button rows.

GridLayout

The GridLayout equalizes all button widths. In this case, a single narrow hint can significantly reduce the space consumed by the button row.