Slider slider = new Slider(1, 5);
slider.setValue(1.0);
If set the value as minium value for the first time, if wont trigger the valueChangedListener for the slider. Are there any ways to trigger it?
Slider slider = new Slider(1, 5);
slider.setValue(1.0);
If set the value as minium value for the first time, if wont trigger the valueChangedListener for the slider. Are there any ways to trigger it?
I doubt there is a proper way of doing this. However, this workaround might work:
Slider slider = new Slider(1, 5);
slider.setValue(1.000001);
Or otherwise you could just create a method that’s called from the value change listener and call that method once, so you won’t have to resort to tricks.
-Olli