Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Combobox key value pair

938898May 22 2012 — edited May 23 2012
How do I create a combo-box with items which have different display value and actual value ?
For eg. I want a combo-box which lists the name of the customers. And when an item is selected, it gives its actual value rather than its display value.

S.N. Customer Name
1234 - ABCDE
1235 - ABCDE

I want a combo-box which displays customer name but when selected I get the value like 1234 in this example.

How do I create such combo-box ?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 20 2012
Added on May 22 2012
3 comments
3,694 views