I am relatively new to Java UI and would appreciate your help with the simple problem I have.
I have a JPanel
type BorderLayout
. The CENTER
part contains a combo box.
When resizing an external frame, the panel changes its size (this is necessary), and the width of the combo box changes (this is also necessary). However, the height of the combobox also changes when the panel is resized. This is undesirable.
How can I make sure my combo box expands in width but not in height?
I also have a button in LINE_START
. I would like this button not to stretch.
source share