• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

textfeild user can only enter formatted date

 
sureshksks ks
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am beginner in java netbeans.
i want to user to enter date in particular format.
that means in textfeild user sees __/__/____ only for a date in (for example) 15/11/2012 format and the programme receives only in that date format
what shall i do with the textfeild to display the format and receive in that particular frmat
i am using netbeans ide
please help
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> that means in textfeild user sees __/__/____

JFormattedTextField with appropriate MaskFormatter
 
m Korbel
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use JSpinner with SpinnerDateModel instead of bothering JFormattedTextField & InputMask & InputVerifier
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic