I tried this example. I noticed that the correct value is not displayed right away but only after at least one draw cycle goes through. In the example below, just press any key to update the value of the slider.

I noticed that the correct value is not displayed right away but only after at least one draw cycle goes through

@kfrajer very well spotted :) and is true for both sliders and knobs because they use easing.

Both sliders and knobs have two values, actual value the currently displayed value in the GUI and target value the value we want it to be. When you use the statement

sliderR.setValue(1.0);

you are setting the target value NOT the actual value. Before each frame the the actual value is adjusted towards to target value depending on the amount of easing. If easing is 0 (zero) then the actual value is set equal to the target value so takes 1 frame. If easing > 0 then it will take several frames to before the actual value becomes equal to the target value thus smoothing the movement of the slider's thumb.