YourType varName = (YourType)comboBox.getSelectedItem();` String value = comboBox.getSelectedItem().toString();