How can I change the width of a JComboBox dropdown list?

后端 未结 6 2126
自闭症患者
自闭症患者 2020-11-30 04:19

I have an editable JComboBox which contains a list of single letter values. Because of that the combobox is very small.

Every letter has a special mean

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-30 04:26

    You might want to use setSize() method.

    combo.setSize(200, combo.getPreferredSize().height);
    

提交回复
热议问题