Hi, I have created a combo box ( comA) which has objects with attributes "id" and "name" .In my Combo box only the name is displayed but based on what is selected I am able to get the "id". Now I have another "ID" which comes from the database and i need to comA.setSelectedItem() when "id" = "ID" Can someone help me with this one thanks.
posted 13 years ago
If you put your objects in a Vector and when you get an ID, search in that Vector for the object. if the object is valid, then call the setSelectedItem(objectFound);