File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 10828

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!