Example usage for javafx.scene.control ScrollBar setValue

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

Introduction

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

Prototype

public final void setValue(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 ww  . j a  v a 2 s  . c  om

    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();
}