Example usage for javax.swing JSlider getSnapToTicks

List of usage examples for javax.swing JSlider getSnapToTicks

Introduction

In this page you can find the example usage for javax.swing JSlider getSnapToTicks.

Prototype

public boolean getSnapToTicks() 

Source Link

Document

Returns true if the knob (and the data value it represents) resolve to the closest tick mark next to where the user positioned the knob.

Usage

From source file:Main.java

public static void main(String[] argv) throws Exception {
    // Create a horizontal slider that moves left-to-right
    JSlider slider = new JSlider();

    boolean b = slider.getSnapToTicks(); // false
}