title: Java Slider - trigger fireStateChanged() without changing the value?
body: <p>I used the code below when initialising my sliders:</p>
  
  <pre><code>//Gets the corresponding slider value, from it's represented value. 
  int curr = valueToSlider(min, max, current, scale, q, grains); 
  
  final JSlider slider = new JSlider(JSlider.VERTICAL, 0, grains, curr);
  
  slider.addChangeListener(new ChangeListener() {
  
    public void stateChanged(ChangeEvent event) {
      double value = sliderToValue(min, max, slider.getValue(), scale, q, grains); 
      String str = ""; 
  
      if (valueType == SliderValueType.FLOAT) 
         str = String.format("%.2f",value);
      if (valueType == SliderValueType.INTEGER) 
         str = String.format("%.0f", value); 
  
      valueLabel.setText(str); 
      callCommand(c, value);
    }
  });
  </code></pre>
  
  <p>Now I need to trigger the changed event to get that valueLabel label to set in its correct format. </p>
  
  <pre><code>slider.setValue(curr); 
  </code></pre>
  
  <p>That doesn't trigger the changed event, I'm guessing because the value hasn't changed. A simple hacky fix is to just do something like: </p>
  
  <pre><code>slider.setValue(1);
  slider.setValue(curr);
  </code></pre>
  
  <p>But you could imagine that in some code, that triggering the changed event with a random value, might have unwanted consequences.  </p>
  
  <p>I could reproduce that <code>setText</code> method in my initialisation method. </p>
  
  <pre><code>if (valueType == SliderValueType.FLOAT) 
     str = String.format("%.2f",curr);
  
  if (valueType == SliderValueType.INTEGER) 
     str = String.format("%.0f", curr); 
  
  valueLabel.setText(str);
  </code></pre>
  
  <p>(Which sounds like the best solution here to be honest). </p>
  
  <p>But just wondering - is there a way to trigger an changed event another way? </p>