• Post Reply Bookmark Topic Watch Topic
  • New Topic

Simple JTextField Question.........  RSS feed

 
sam patel
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How can i add text to jtextfield in caps
for example
i have a jtextfield...
My cap lock is off.
So. i am running my program and when i type something in jTextField it shows as UPPERCASE...
I would greatly appreciate if someone can some me a simple example.....
Any help is greatly appreciated.
Thanks in advance
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the example in the tutorial. It shows numbers but you can modify it with the correct String method (toUpperCase(). If you only care after the fact, do it when you use the getText() method. The first will convert them as you type.
 
sam patel
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Stevens:
Take a look at the example in the tutorial. It shows numbers but you can modify it with the correct String method (toUpperCase(). If you only care after the fact, do it when you use the getText() method. The first will convert them as you type.

Thank you for your help...
I figured it out...
Again Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!