aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to set the Date field in Swings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to set the Date field in Swings" Watch "How to set the Date field in Swings" New topic
Author

How to set the Date field in Swings

aaaaaaaa aaaaaaaaaaaa
Greenhorn

Joined: Sep 14, 2006
Posts: 23
Hai,

I am working on swings.

will you please suggest me to create a Date TextField, which should have the following properties:

1) The text field should look like --/--/----(MM/DD/YYYY).

2) When i enter a digit in the first placeholder of MM, and if that digit
is more than 1 then that placeholder should be filled with 0 (zero).
what I mean is if we enter a digit in any placeholder and if that
digit is invalid for that placeholder then that placeholder should be
defaultly filled with zero.

I request you to please give the solution as early as possible and i eagarly wait for your reply.

by
Yugandhar Akkaldevi
Juhi Gupta
Greenhorn

Joined: Oct 04, 2006
Posts: 12
Originally posted by yugan akkaldevi:
Hai,

I am working on swings.

will you please suggest me to create a Date TextField, which should have the following properties:

1) The text field should look like --/--/----(MM/DD/YYYY).

2) When i enter a digit in the first placeholder of MM, and if that digit
is more than 1 then that placeholder should be filled with 0 (zero).
what I mean is if we enter a digit in any placeholder and if that
digit is invalid for that placeholder then that placeholder should be
defaultly filled with zero.

I request you to please give the solution as early as possible and i eagarly wait for your reply.

by
Yugandhar Akkaldevi


Well this is not a homework solving forum....

First you show us till now where have you been got stucked.

Then only we can advice you.. what to do....

best of luck for your try
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
save yourself a lot of grief, use a datePicker
 
 
subject: How to set the Date field in Swings