title: JComboBox adds items for one ArrayList of strings, but disappears from GUI for another
body: <p>I have 2 JComboBox components added to my GUI <code>productComboBox</code> and <code>categoryComboBox</code>, with the following item listeners defined for each:</p>
  
  <pre><code>    categoryComboBox.addItemListener(new GoItemListener());
      productComboBox.addItemListener(new ProductItemListener());
  </code></pre>
  
  <p>The user first selects a product, and then the listener should populate the category box dependent on which product is selected. My item listeners are inner classes.</p>
  
  <p><code>ProductItemListener</code> calls a method <code>populateCategories</code> which looks like this:</p>
  
  <pre><code>    protected void populateCategories() {
          String product = productComboBox.getSelectedItem().toString();
  
          myMediaDataAccessor.init(product);
  
          ArrayList categoryArrayList = null;
          categoryArrayList = myMediaDataAccessor.getCategories();
  
          Iterator iterator = categoryArrayList.iterator();
          String aCategory;
          while (iterator.hasNext()) {
              aCategory = (String) iterator.next();
              categoryComboBox.addItem(aCategory.toString());
          }
      }
  </code></pre>
  
  <p>I have two product items in my <code>productComboBox</code>, Music and Videos. If I select Music then my <code>categoryComboBox</code> gets populated correctly with the strings from the ArrayList. </p>
  
  <p>The problem is, if i select Videos, my <code>categoryArrayList</code> contains the correct ArrayList of strings, so my data is being returned and seemingly added to the <code>categoryComboBox</code> as I'm not getting any exceptions, its just that my <code>categoryComboBox</code> disappears from the GUI.</p>
  
  <p>Any ideas?<br>
  Thanks</p>