Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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");
    }
}