I have created a jComboBox but it takes the full width of the frame. how to set the width fixed.
yes borderlayout for the frame and box layout for the panel. i am
try comboBox.setPreferredWidth(200); or some other value to set the width
jzd is right. The actual API is setPreferredSize(new Dimension(...));
setPreferredSize(new Dimension(...));