You can get the selected or entered value from the JComboBox by calling the getSelectedItem method. If this is not an existing element, you will get a String object. Otherwise, you will receive any object in which you filled the combo box.
Carlos
source share