title: java jspinner change listener trigger
body: <p>I have 2 comboboxes and a spinner, that work like this: if the selected item of the first combo is changed, the second combo keeps its selected item but re-calls the spinner (the spinner is linked only to the second box). My problem is that I can't trigger the stateChange listener of the spinner when I do this. </p>
  
  <p>Here is the code for forcing the second box to reselect its last item when the first one is changed (nothing wrong here, it works just fine):</p>
  
  <pre><code>String orientare = (String) orientareComboBox.getSelectedItem();
  orientareComboBox.setSelectedItem(orientare);
  </code></pre>
  
  <p>This is the code for the second box actionListener:</p>
  
  <pre><code>public void actionPerformed(ActionEvent e) {
  
              JComboBox combo = (JComboBox) e.getSource();
              String value = combo.getSelectedItem().toString();
              if (value.equalsIgnoreCase("oblica"))
              {
                  unghiSpinner.setEnabled(true);
  
                  double unghi = (double) unghiSpinner.getValue();
                  unghiSpinner.setValue(new Double(unghi));
  
              }
  }
  </code></pre>
  
  <p>And the spinner's Listener:</p>
  
  <pre><code>           public void stateChanged(ChangeEvent e) 
          {
              if (unghiSpinner.isEnabled())
              {
                 // do something
              }
          }
  </code></pre>
  
  <p>I do not know what command I should use for <code>unghiSpinner</code> to trigger its listener, because <code>setValue()</code> can't do it. </p>