In this section, you will learn how to create a JSpinner component of swing. The JSpinner provides the up-down arrow buttons which are used to increase or decrease the numeric value.
This program provides an appropriate JSpinner component on the frame. The following figure shows that:
This program have used the following methods or API's components for appropriate:
This is the constructor of JSpinnerComp class. This constructor used for displaying the JSpinner component on the frame.
This is the constructor of JSpinner class. It extends form the JComponent class. This is used to create a spinner. It takes the initial value "0" by default.
Here is the code of program:
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: April 14, 2007 If you enjoyed this post then why not add us on Google+? Add us to your Circles