Reputation: 4167
I can get current vvalue with following code:
s1.vvalueProperty().addListener(new ChangeListener<Number>() {
public void changed(ObservableValue<? extends Number> ov,
Number old_val, Number new_val) {
println("s1.vvalue:${s1.vvalue.inspect()}")
System.out.println(new_val.intValue());
}
});
How to listen ScrollPane is scrolled to the end?(how to get max vvalue?)
Upvotes: 0
Views: 195
Reputation: 7768
Much better than hard-coding 1.0
, call ScrollPane.getVMax()
. If the value changes in the future, your application might not break!
https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/ScrollPane.html#getVmax--
Upvotes: 1