I would like to have a JTable component in one panel to take up as much space as the window allows. Underneath, however, I would like to add another, fixed size panel with a few buttons in it. WHich layout to use to allow the bottom panel be of fixed size, while allowing JTable panel to stretch according to size of the window?
Share
It’s hard to visualize what you want exactly, but here’s an excerpt from Oracle that may help you:
Scenario: You need to display a component in as much space as it can get.
Scenario: You need to display a few components in a compact row at their natural size.
Scenario: You need to display a few components of the same size in rows and columns.
Scenario: You need to display a few components in a row or column, possibly with varying amounts of space between them, custom alignment, or custom component sizes.
Scenario: You need to display aligned columns, as in a form-like interface where a column of labels is used to describe text fields in an adjacent column.
Scenario: You have a complex layout with many components.
Source: Oracle: Using Layout Managers