BorderLayout - Control height but not width
问题 I am relatively new to Java UI and would appreciate your help with a simple problem that I have. I have a JPanel of type BorderLayout . The CENTER part contains a combo box. As the outer frame is resized, the panel resizes (this is desired) and the width of the combo box changes (this is desired too). However, the height of the combobox is also changing as the panel is resized. This is not desired. How can I ensure that my combo box expands in width but not in height? I also have a button in