It's not a secret anymore!
The moose likes Swing / AWT / SWT and the fly likes text field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "text field" Watch "text field" New topic

text field

Lavanya Balaraman

Joined: Feb 17, 2009
Posts: 10
How to restrict Jtextfield only for text
pleases help me
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10747

By "only text" i presume you mean only alphabets.
Here is a link for a text field which allows only numbers. You can modify it to allow only alphabets.

..and Welcome to the Ranch

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
I agree. Here's the link:
subject: text field
It's not a secret anymore!