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

后端 未结 6 2156
自闭症患者
自闭症患者 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:33

    Sounds like you'll need to write your own ComboBoxUI.

    There is a good example here that shows how to accomplish this.

    Also note, the method you would probably be interested in is the createPopup() method. This is the method that creates the popup for the combo box and where you would be able to customize it.

提交回复
热议问题