title: how to change combobox's data after change another combobox item selection?
body: <p>I have a MVC application written in java which has a form with three comboboxes in it.
  year / month / day and I want to change the number of days if the selection of year and month changed.
  in my viewer I just define the comboboxes </p>
  
  <pre><code>createComboBoxes( mainContentPage, "combobox name");
  </code></pre>
  
  <p>in my controller I have :</p>
  
  <pre><code>public class ComboBoxItemListener implements ItemListener
  {
  
  private int year=0;
  private int month=0;
  private int day=0;
  
  public WeatherController c_wc;
  @Override
  public void itemStateChanged(ItemEvent event)
  {
  
  
      JComboBox comboBox = (JComboBox)event.getSource();
      if (event.getStateChange() == ItemEvent.SELECTED)
      {
                      //this area is my problem
          if(comboBox.getName() == Helper.COMBOBOX_MONTH || comboBox.getName() == Helper.COMBOBOX_YEAR)
          {
                      //definitely this line is not correct
                  c_wc.addDaysToComboBox(comboBox, year, month);
                  comboBox.setEnabled(true);
  
  
          }
          //rest is okay
          switch(comboBox.getName())
          {
              case Helper.COMBOBOX_YEAR:
                  year = Integer.parseInt(comboBox.getSelectedItem().toString().trim());
  
                  break;
  
              case Helper.COMBOBOX_MONTH:
                  KeyValue&lt;String, Integer&gt; selectedItem = (KeyValue&lt;String,Integer&gt;)event.getItem();
  
                  month = Integer.parseInt(selectedItem.getValue().toString());
                  break;
  
              case Helper.COMBOBOX_DAY:
                  day = Integer.parseInt(comboBox.getSelectedItem().toString().trim());
                  break;
  
              case Helper.COMBOBOX_AIRPORT:
                  break;
          }
          System.out.println(year + " " + month + " " + day);
      }
  }}
  </code></pre>
  
  <p>how can I change another component after firing some other event?</p>