I use a grid layout of 2 rows and 6 column. the first column is a label and second is combo. My problem is
according to the size of the label the combo box size also increases.
i want a stable size for combo? which layout should i use?
I want a design like
*label1: combo1 label2: combo2 label3: combo3
label4: text1 label5: text2 label6: text3 *
for
GridLayoutyou can use JComboBox#setPrototypeDisplayValue, then you can to set initial size forJComboBoxon the screen very confortlyyou can to use
SpringLayoutorGridBagLayoutuse todays custom
LayoutManagersasMigLayoutis for examplenotice about to choose the proper
LayoutManager, everything depends of if the contents should or shouldn’t be resizable with container