Removing all Items from a combo box in Java

前端 未结 9 1282
自闭症患者
自闭症患者 2021-02-06 11:04

I need to remove all items from the combo box

    int itemCount = combo.getItemCount();

    for(int i=0;i

        
9条回答
  •  轮回少年
    2021-02-06 11:34

    You can use

    this.combo.removeAllItems();

    to remove all the items in JComboBox.

提交回复
热议问题