I just found out what my problem was. I had 2 jComboBox fields (One in the class and one in the main) and added the wrong one to the frame.
Type: Posts; User: Bingo90
I just found out what my problem was. I had 2 jComboBox fields (One in the class and one in the main) and added the wrong one to the frame.
Yes, I'm using an already existing JComboBox, but adding it directly to it has the same effect. The model I'm getting with getModel() has no add method.
Here's a screenshot that proves the...
I'm trying to update a ComboBox by adding new items to a model.
DefaultComboBoxModel<String> model = new DefaultComboBoxModel<>();
for (int i = 0; i < values.length; i++)
{...