Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DateValidation

 
Prashanth Bhanu
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
I'm in a situation where i used as JTextField as a CellEditor for a JTable column.Column header is date.
How do i check the date is entered is a valid date.
One validation being:31-2-2004,moment the month is typed should restict as feb cant have 31 days.
Please give me some tip on this.How i can achive this
Thanks in adavnce
prashu
 
Serghei Jelauc
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to use JFormattedTextField as cell editor and SimpleDateFormat class.
 
Pritam Barhate
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, using JFormattedTextField will solve the problem. If you want help on using JFormattedTextField then check out this quick tutorial at IBM developerWorks.
 
Prashanth Bhanu
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks alot and also for the link u've given
Thanks
prashu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic