I can't remove this line
JComboBox langList = new JComboBox(langStrings);
Is it because the
IDE, i.e. NetBeans doesn't allow you to do that?
Actually what I was trying to say was that you never initialized the langList instance variable. To illustrate your problem, this might give you and idea why your code doesn't work.
If you use NetBeans, when you drag a component into the JFrame, it normally creates an instance variable of that component and then in the initComponent() method, it will do the initialization.
Hope this helps.