This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes spinner question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "spinner question" Watch "spinner question" New topic
Author

spinner question

krillian konstatos
Ranch Hand

Joined: Jan 03, 2011
Posts: 49

hi, all!

I have a question about the ListSpinnerModel and how i can use this to display year selections using
java.util.Date and Calendar classes and methods. I have done this using the SpinnerDateModel class
in the YearSpinnerComponent class i have previously used in one of my projects. Now i need to
provide the user with a default value of "N/A" at the startup of the application so that the date value
in the spinner component always start with the forementioned value. Can someone point me in the
right direction so that i can use date selection in a spinner list model or is there any other way to do this
what i am trying to accomplish? maybe i should use another component for this attempt perhaps
a JComboBox would be a better choice? any tip would be great!

Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

Would Rob Camick's Combo Box Prompt be useful? Or do you need to allow reselecting "N.A." even after selecting a year?


luck, db
There are no new questions, but there may be new answers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: spinner question
 
Similar Threads
Checking Date
formatting challenge using JSpinner
Non compilation of Sun Java's program SpinnerDemo3
Help please, using a JSpinner but I can't get the user's input into a date object
Jspinner Date increment