Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-05-2007, 09:25 AM
Member
 
Join Date: Jun 2007
Location: Colombo, Sri Lanka
Posts: 32
hiranya is on a distinguished road
Date Inputs
Hi,
I want the user to enter a date value. What is the Java way of doing this? In .NET they have an object called DateTimePicker for this purpose. Is there a similar object in Swing?

Regards,
Hiranya
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-05-2007, 10:07 AM
Senior Member
 
Join Date: Jul 2007
Posts: 1,266
hardwired is on a distinguished road
Is there a similar object in Swing?
Not as far as I know as of j2se 1.5
There may be some private or public apps that do this.
You can make up something that will do this for you. It is difficult to have a user enter a date string in a textField and then try to parse it. You can provide components such as JSpinners for the user to select a day, month and year from. This way you can control how the data is handled and eliminate parsing miseries. Just depends on what you want to do.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-06-2007, 11:24 AM
Member
 
Join Date: Jun 2007
Location: Colombo, Sri Lanka
Posts: 32
hiranya is on a distinguished road
I'm not very familiar with JSpinners. Could you give some more information on JSpinners. How do we specify the range of values in a JSpinner? Can we use JSpinners with Strings?

Regards,
Hiranya
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 11-06-2007, 07:11 PM
Senior Member
 
Join Date: Jul 2007
Posts: 1,266
hardwired is on a distinguished road
Could you give some more information on JSpinners.
How to Use Spinners
How do we specify the range of values in a JSpinner?
This is done via the SpinnerModel for each spinner - see JSpinner api.
Can we use JSpinners with Strings?
Yes, with a SpinnerListModel.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
java.util.Date vs java.sql.Date Jack New To Java 3 12-18-2008 11:37 PM
Difference between current date and anothe date vijay balusamy New To Java 1 04-16-2008 06:15 PM
Java program that stores user inputs staticy2003 Advanced Java 6 01-24-2008 09:46 PM
Calendar.DATE mew New To Java 1 01-04-2008 09:51 PM
Date comparison Rageagainst20 New To Java 0 12-19-2007 08:34 PM


All times are GMT +3. The time now is 03:01 PM.


VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org