Java tutorial
//package com.java2s; import javax.swing.JLabel; import javax.swing.JSpinner; import javax.swing.SpinnerModel; public class Main { private static JSpinner addLabeledSpinner(String label, SpinnerModel model, boolean b) { JLabel l = new JLabel(label); //c.add(l); JSpinner spinner = new JSpinner(model); l.setLabelFor(spinner); //c.add(spinner); return spinner; } }