GridLayout
or
BorderLayout
.
Otherwise,
BorderLayout
or
GridBagLayout
might be a good match.
If you use BorderLayout
,
you will need to put the space-hungry component in the center.
With GridBagLayout
,
you will need to set the constraints for the component so that
fill=GridBagConstraints.BOTH
.
Another possibility is to use
BoxLayout
,
making the space-hungry component
specify very large preferred and maximum sizes.
JPanel
to group the components
and using either the JPanel
's default
FlowLayout
manager
or the
BoxLayout
manager.
SpringLayout
is also good for this.
GridLayout
is perfect for this.
BoxLayout
is perfect for this.
SpringLayout
is a natural choice for this.
The SpringUtilities
class
used by several Tutorial examples
defines a makeCompactGrid
method
that lets you easily align multiple rows and columns of components.
GridBagLayout
or
SpringLayout
,
or grouping the components into one or more JPanel
s
to simplify layout.
If you take the latter approach,
each JPanel
might use a different layout manager.