Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Limiting text in a JTextField

 
Barry Brashear
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to limit the amount of text that can be typed
into a JTextField?

Thanks.
 
Hari priya
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi barry -

Here is a link to the code which shows how to limit input. Hope this helps!

http://www.rgagnon.com/javadetails/java-0198.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic