Java examples for Swing:JSpinner
Create JSpinner
import javax.swing.JSpinner; import javax.swing.SpinnerNumberModel; public class Main { public static void main(String[] args) { int minValue = 1; int maxValue = 10; int currentValue = 5; int steps = 1; SpinnerNumberModel nModel = new SpinnerNumberModel(currentValue, minValue, maxValue, steps);/*from ww w .j a va 2 s. c o m*/ JSpinner numberSpinner = new JSpinner(nModel); } }