The probable problem is that you are passing a List<String>
reference to the JComboBox
. One correct way to do this will be to convert the List<String> s
to a String[]
array and pass it to the constructor: JComboBox(E[] items)
new JComboBox(s.toArray(new String[s.size()]));
Read also How to Use Combo Boxes