ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

4
Date Submitted Mon. Oct. 23rd, 2006 5:35 PM
Revision 1
Beginner jonathanstarrett
Tags "form input" | Java | JComboBox
Comments 0 comments
I was looking for an easy way to populate a combo box with strings taken from an enumeration, and also to be able to pull out Enum objects from the combo box. After some searching, I found EnumComboBoxModel on the JDesktop website, but was not able to find any code.

Instead I came up with an easier solution that did not require me to define a new Model class, but instead uses javax.swing.DefaultComboBoxModel.

Sorry for the disorganization of the code, but hopefully you get the idea.