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!

JComboBox with different display values for the text and list entrys

843806Feb 20 2009 — edited Mar 5 2009
Hi there,

I want to use special codes for a combobox that represents different entrys.

The goal is to have the drop-down display a description of the codes while the
non-active JComboBox will only display the code (usually a few characters) of the option
after it has been selected.

Tried to implement my own ListCellRenderer but that only works for the ListEntries and i need to change the display value of the
combo box somehow.

How would I do this?

Any hint is appreciated.

Regards

Matt
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 2 2009
Added on Feb 20 2009
30 comments
2,359 views