tags:

views:

51

answers:

1

Hi folks,

I have a jComboBox that I am populating with some objects. The objects are of a type which I have made myself, and include a String and an int. The object's toString method returns the String, which is displayed in the Combo Box.

Now, I wish to select an item in the Combo Box with code. How do I do this?

There are multiple items starting with the same letter

Thanks

+4  A: 
Matthieu BROUILLARD
Hi There, the thing is though, is that anObject has 2 fields, one is an int, and the other is a String. But maybe just setting it to the string will work... I will try this and let you know
jtnire
@jtnire: see my edit
Matthieu BROUILLARD