code: public void stateChanged (ChangeEvent e)
      {
          JSlider source = (JSlider)e.getSource();
          if (!source.getValueIsAdjusting()) {
              int val = source.getValue();
              // update the model with the newly selected component
              setSelectedComponent(val);
              // update the label with the new value
              _clabel.setText(Integer.toString(val));
          }
      }
docs: documentation inherited