How do I scroll to a certain component in Java FX?
问题 I need to scroll down to a certain label component in Java FX. How do I do that ? I have ids attached to label component. <ScrollPane> <VBox fx:id="menuItemsBox"> <Label text="....."/> <Label text="....."/> <Label text="....."/> .... <Label text="....."/> </VBox> </ScrollPane> 回答1: You can set the scrollPane's vValue to the Node's LayoutY value. Since the setVvlaue() accepts value between 0.0 to 1.0 , you need to have computation to range your input according to it. scrollPane.setVvalue(/