Link to home
Start Free TrialLog in
Avatar of snajalm
snajalm

asked on

Does Swing come with Calendar and time field components?

I would like to have Date and Time fields in my jPanel application so that the user can pick a date and time from a drop down lists. Is there any Swing component out there which I can use rather than having to re-invent the wheel??!
Avatar of for_yan
for_yan
Flag of United States of America image


choose here different variants:
http://www.java2s.com/Code/Java/Swing-Components/SwingDateselectorChooserhighlight.htm
aee links at the bottom
this also seemms simple, maybe the same as before:
http://ykyuen.wordpress.com/2011/09/05/java-swing-datepicker-1/
How wuould you select time form the dropdown list?
It is common with date, but I don't think such elemnt is common with time - you can have drop down list say by hours, or two dropdowns
- by hours and minutes

I downloaded and tried this - works nicely for me:
http://sourceforge.net/projects/flib/files/flib/FLib%201.1.1/
ASKER CERTIFIED SOLUTION
Avatar of for_yan
for_yan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CEHJ
This is the classic date picker

http://www.toedter.com/en/jcalendar/
Avatar of snajalm
snajalm

ASKER

The one that I ended up using was JXDatePicker from the Swingx project which was pretty cool and made my purpose!  But thanks guys for your kind and valuable responses!
There are so many suggestions here and they all seem to be solutions.  My interent link seems to went down therefore I missed all these intelligent suggestions.  I am only now starting to receive my emails again so I would need a little time to review the solutions.
Sure, take as much time as you want :)
I'd first try the accepted solution as I looked at it more attentively - it seemed reasonable to me .
rather switch to your question - otherwise we are disturbing the author of this old trail with emails, ect.
THIS IS FOR "for_yan:"
Your date solution from flib and your source code works well and is a solution.  I set this up as a separate class and pass parameters.  However, I still have to return the date to my class in the format I require "mm/dd/yy".  I cant seem to get the actual date in alone my format from the c.getTime() or any other date methods.  Can you help me and that would be the end.  Thanks.
THIS IS FOR expert "for_yan:"
I have not heard from you concerning my last comment.  Are you still there?  Can you please give me some feedback please concerning solution 10/23/11 09:30 PM, ID: 37015932?  See my last comment.
THIS IS FOR expert "for_yan:"
Solution ID 10/23/11 09:30 PM, ID: 37015932 says the solution was accepted but no point was awarded.  However, I just accepted the comment but I haven't awarded any point yet.  How can this be.  I have not heard from you concerning my last comment.  Are you still there?  Can you please give me some feedback please concerning solution 10/23/11 09:30 PM, ID: 37015932?  See my last comment.
DOn't understand anything - are you reading my posts - look above your post - and please, don't post in this old trail - it causes excessive email traffic to those people who may not be interested in it