Example usage for javax.swing SpinnerListModel SpinnerListModel

List of usage examples for javax.swing SpinnerListModel SpinnerListModel

Introduction

In this page you can find the example usage for javax.swing SpinnerListModel SpinnerListModel.

Prototype

public SpinnerListModel() 

Source Link

Document

Constructs an effectively empty SpinnerListModel.

Usage

From source file:MainClass.java

public static void main(final String args[]) {
    JFrame frame = new JFrame("JSpinner Dates");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    SpinnerModel model1 = new SpinnerListModel();
    JSpinner spinner1 = new JSpinner(model1);
    JLabel label1 = new JLabel("None");
    JPanel panel1 = new JPanel(new BorderLayout());
    panel1.add(label1, BorderLayout.WEST);
    panel1.add(spinner1, BorderLayout.CENTER);
    frame.add(panel1, BorderLayout.NORTH);

    frame.setSize(200, 90);// ww w.ja v a2  s  . co m
    frame.setVisible(true);

}