I've problem with a JComboBox SelectedItem can someone help me ?
I've implemented a GUI window where are a various textfield and one JComboBox. When I click button, code must create an Object with the strings of the textfield and string of ComboBox, but I've a NullPointerException
in SelectedItem
... The code to get is :
(String)combo.getSelectedItem()
I tried too:
combo.getSelectedItem().toString()
but don't work ! I don't know if I need a ActionListener but think it's not required.