jcombobox populate with hashmap
问题 I want to fill my combobox with a display value and a number value HashMap<Integer, String> databaseList I would to display the string in the combobox but the value of the comboxbox must be integer. I know this is posible in c# is this also possible in Java? 回答1: I want to fill my combobox with a display value and a number value I would create a separate Object to contain the two properties and then add these indivdual objects to the combo box. Check out Combo Box With Hidden Data for an