O'Reilly logo

Beginning Java 8 APIs, Extensions and Libraries Swing, JavaFX, JavaScript, JDBC and Network Programming APIs by Kishori Sharan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Since a JSpinner provides the spinning capability to a variety of list of choices, it depends heavily on its model for its creation. In fact, you must provide a model for the JSpinner in its constructor unless you want a trivial JSpinner with just a list of integers. It supports three different kinds of ordered lists of choices: a list of numbers, a list of dates, and a list of any other objects. It provides three classes to create a model of three different kinds of lists:

  • SpinnerNumberModel
  • SpinnerDateModel
  • SpinnerListModel

A spinner model is an instance of the SpinnerModel interface. It defines the getValue(), setValue(), getPreviousValue(), and getNextValue() methods to work with values in the JSpinner. All these methods work with objects ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required