Dynamically change JComboBox

前端 未结 4 510
天命终不由人
天命终不由人 2020-12-15 17:32

I am fetching the data values from the database successfully. I have also stored them into a String[] array. I need to load the String array as the items of the

4条回答
  •  眼角桃花
    2020-12-15 17:48

    You have a couple of options. You can use removeAllItems() (or one of the other remove methods) and addItem(Object anObject) to manipulate the selectable objects. Or you could implement a ComboBoxModeland allow it to serve up data from your array.

提交回复
热议问题