I want to add a JComboBox in Swing that is simple but I want to assign the values for each items in combo. I have the following code
JComboBox
you can create your own Model and add it to the combo box instead of adding Strings directly.
check Java ComboBoxModel.
you can find more info in this thread