In javaFX scrollpane. It scrolls so slowly.. Any method to boost it up? I've looked all over here, and no luck.. I've found some thread about listview..
Demonstration:
The JavaFX package is available in javafx.scene.control.ScrollPane package. Scroll pane is allowed to view complete elements by vertical and horizontal scroll. ScrollPane (): It is a default constructor, used to create a scroll pane instance.
Whatever the reason, JavaFX makes it easy to provide scrolling capabilities to any node in a scene graph. This is accomplished by wrapping the node in a ScrollPane. When a ScrollPane is used, scrollbars are automatically implemented that scroll the contents of the wrapped node. No further action is required on your part.
A Control that provides a scrolled, clipped viewport of its contents. It allows the user to scroll the content around either directly (panning) or by using scroll bars. The ScrollPane allows specification of the scroll bar policy, which determines when scroll bars are displayed: always, never, or only when they are needed.
The visible part of a JavaFX ScrollPane is called the ScrollPane viewport . As you scroll around the content displayed inside the ScrollPane using the scrollbars, the viewport is moved around the content too, making different parts of the content visible.
You could do this in the FXML styling.
.scroll-pane .scroll-bar:vertical {
-fx-unit-increment: 5 ;
-fx-block-increment: 5 ;
}
.scroll-pane .scroll-bar:horizontal {
-fx-unit-increment: 5 ;
-fx-block-increment: 5 ;
}
Play around with the unit and block increment numbers until you get a desired effect.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With