If you create a brand new JComboBox, then the old one is still part of the GUI, and you don't have a handle to it anymore. Remember that a
Java variable is just a reference or "pointer" to an object -- it's not the object itself. (See
here for an entertaining explanation of this, if needed.)
What you want to do is to tell the existing JComboBox that it should display a new set of items. Perhaps the shortest -- if not the easiest to understand -- way to do this is to construct a new ComboBoxModel containing the new data, and giving it to the JComboBox:
I made a few other small but significant changes to this bit of code. One important one is to use the equals() method rather than the "==" operator to compare Strings. The operator checks for physical equality -- i.e., both Strings are the same physical block of memory. The equals() method checks for equivalence -- i.e., the same characters in the same order, but perhaps two different copies of them.
The other change is that I renamed your "StringArray" variable to "stringArray". Java's naming conventions for classes (CapitalizedLikeThis) and variables (lowercaseLikeThis) are very firmly entrenched; flouting them makes your code harder for other people to understand at a glance.