Example usage for javafx.scene.control ScrollBar setUnitIncrement

List of usage examples for javafx.scene.control ScrollBar setUnitIncrement

Introduction

In this page you can find the example usage for javafx.scene.control ScrollBar setUnitIncrement.

Prototype

public final void setUnitIncrement(double value) 

Source Link

Usage

From source file:Main.java

@Override
public void start(Stage stage) {
    Group root = new Group();
    Scene scene = new Scene(root, 500, 200);
    stage.setScene(scene);//from  w  w w  . j  av a 2 s.  c  o m

    ScrollBar s1 = new ScrollBar();
    s1.setMax(500);
    s1.setMin(0);
    s1.setValue(100);
    s1.setUnitIncrement(30);
    s1.setBlockIncrement(35);

    s1.setOrientation(Orientation.VERTICAL);

    root.getChildren().add(s1);
    stage.show();
}