Java tutorial
//package com.java2s; import javax.swing.JSlider; public class Main { public static void setupSl(JSlider sl, int minorTickSpacing, int maximum) { sl.setMaximum(maximum); sl.setMinorTickSpacing(minorTickSpacing); sl.setPaintLabels(true); sl.setPaintTicks(true); sl.setValue(0); } }