Code example for JSlider

Methods: setPaintTicks

0
    public void stateChanged(final ChangeEvent e) {
        valueLabel.setText(Integer.toString(slider.getValue()));
    } 
 
    public void setPaintTicks(final boolean b) {
        slider.setPaintTicks(b);
    }  
} 
Connect your IDE to all the code out there  Get Codota for Java