Example usage for javafx.scene.control Slider setShowTickLabels

List of usage examples for javafx.scene.control Slider setShowTickLabels

Introduction

In this page you can find the example usage for javafx.scene.control Slider setShowTickLabels.

Prototype

public final void setShowTickLabels(boolean value) 

Source Link

Usage

From source file:Main.java

@Override
public void start(Stage stage) {
    Group root = new Group();
    Scene scene = new Scene(root, 600, 400);
    stage.setScene(scene);/*  w  w w  .  ja  va2  s  .c  o  m*/
    stage.setTitle("Slider Sample");

    Slider slider = new Slider(0, 1, 0.5);
    slider.setShowTickMarks(true);
    slider.setShowTickLabels(true);
    slider.setMajorTickUnit(0.25f);
    slider.setBlockIncrement(0.1f);

    root.getChildren().add(slider);

    stage.show();
}