How to set selected index JComboBox by value
setSelectedItem(“banana”). You could have found it yourself by just reading the javadoc. Edit: since you changed the question, I’ll change my answer. If you want to select the item having the “banana” label, then you have two solutions: Iterate through the items to find the one (or the index of the one) which has the … Read more