Do I need to switch layout managers, or is there a way to add column headers to each panel? Glue seems like an idea, but I am not sure how to position the header at the very top, while still centering the other buttons.
Wrap a JPanel
around each of your columns with a BorderLayout
and put the header in the BorderLayout.NORTH
. The original column panel can be put in the BorderLayout.CENTER
.
There is no need to stick to just one layout. Typically it is easier to nest different layouts to obtain a result