I have a couple of line charts inside GridPane:
@FXML
private GridPane LineChartVBox = new GridPane();
And this is my Scrollbar:
ScrollBar sc = new ScrollBar();
sc.setMin(0);
sc.setOrientation(Orientation.VERTICAL);
hbox1.getChildren().addAll(LineChartVBox,sc);
sc.valueProperty().addListener(new ChangeListener<Number>() {
public void changed(ObservableValue<? extends Number> ov,
Number old_val, Number new_val) {
LineChartVBox.setLayoutY(-new_val.doubleValue());
}
});
I have a problem with the scrollbar because it does not do anything and I can not even see the end to it.
Here is the example of it: