Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JText

 
Vaskar Dasgupta
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I would like to restrict the user to enter a minimum of 3 characters and a maximum of 8 characters in the 'UserID' text field (JTextField), is there any API for this in java. Can you suggest any solution ?
Thanks in advance.
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a link to the Sun tutorial Go to the creating validated textfields section. In the example check out the insertString method. You will need to modify that to limit the entry.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic