We would like to know how to create Spinner model from String array.
/* www. j ava2 s . c o m*/ import javax.swing.JSpinner; import javax.swing.SpinnerListModel; public class Main { public static void main(String[] argv) throws Exception { SpinnerListModel listModel = new SpinnerListModel(new String[] { "red","green", "blue" }); JSpinner spinner = new JSpinner(listModel); spinner.setValue("blue"); } }