Code example for JSlider

Methods: setValue

0
     * 
     * @param   val  value (coerced to between minimum and 0.5) 
     */ 
    public void setLowValue( double val ) {
        val = Math.min( Math.max( val, min_ ), 0.5 );
        loSlider_.setValue( (int) ( Math.log( val ) * SCALE ) );
    } 
 
    /** 
     * Sets the upper cut value 
     * 
     * @param  val   value (coerced to between 0.5 and maximum) 
     */ 
    public void setHighValue( double val ) {
        val = Math.min( Math.max( val, 0.5 ), 1.0 - min_ );
        hiSlider_.setValue( (int) ( -Math.log( 1.0 - val ) * SCALE ) );
    } 
 
    /** 
     * Adds a listener which will be notified when the cut levels have 
Connect your IDE to all the code out there  Get Codota for Java