Code example for JSlider

Methods: getValue

0
    /** 
     * Returns the current value of the slider. 
     */ 
    public int getValue () 
    { 
        return _slider.getValue();
    } 
 
    /** 
     * Sets the slider's current value. 
     */ 
    public void setValue (int value)
    { 
        _slider.setValue(value);
        _value.setText(Integer.toString(value));
    } 
 
    /** 
     * Sets the slider's minimum value. 
     */