I want to execute a code every time a is updated Slider JavaFX
but only when its slider ( ) is stopped moving thumb
with the mouse. I have tried with the events OnMouseExited
and OnMouseDragReleased
but none works.
What event do I need to use?
I want to execute a code every time a is updated Slider JavaFX
but only when its slider ( ) is stopped moving thumb
with the mouse. I have tried with the events OnMouseExited
and OnMouseDragReleased
but none works.
What event do I need to use?
When we click with the mouse on
thumb
a controlSlider
in order to modify its value, the events that are generated are the following:OnMousePressed
when we click the mouseOnMouseDragged
in case we slip yourthumb
OnMouseReleased
when we stop clicking the mouseOnMouseClicked
just after the previous eventIf you want to execute code right when you release the mouse, you need to catch the event
OnMouseReleased
. This is where you have to put any code that updates or modifies othersSlider
to avoid continually readjusting them (and possibly annoying blinking) before reaching the desired value.