I want to create a JLabel (containing an image) in the north position of a border layout that auto-sizes to a length matching the preferred width of a component in the center position of a border layout.
The only way I can do this at present is to create another panel in the north position and add the label in the center position of this panel.
Is there a way to do this without the extra panel?