문제

Say I have a javafx.scene.control.Slider slider and javafx.scene.control.Button button. What should I write in the button event handler to change the slider value programmatically on the button click?

도움이 되었습니까?

해결책

Call setValue with value between min and max of your slider (0 and 1 by default) http://docs.oracle.com/javafx/2/api/javafx/scene/control/Slider.html#setValue(double)

slider.setValue(0.5);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top