0

I encounter a same question that Nickolay asked in below post: Adding items to a JComboBox

After I successfully implement the solution provided by JBuenoJr, now the question is what parameter should I put in if I need to remove an item? I tried both parameter of the ComboItem class but neither of them works.

comboBox.removeItem(??????);

Community
  • 1
  • 1

1 Answers1

0

You need to pass the whole ComboItem instead of just the key or value.

So:

comboBox.removeItem(myComboItem)

Dimitrios Begnis
  • 823
  • 6
  • 16