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 Letters only in JOptionPane? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Letters only in JOptionPane?" Watch "Letters only in JOptionPane?" New topic

Letters only in JOptionPane?

joe kane

Joined: Jan 26, 2004
Posts: 29
I was wondering how do you validate a inputbox so that only letters can be entered e.g. A --> Z

I know this validates it so only number can be entered, but what for the other way around?
Thanks Joe Kane
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Moving this to the Swing / JFC / AWT forum...

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
joe kane

Joined: Jan 26, 2004
Posts: 29
Anyone have any ideas,
Thanks in advance joe kane
Eddie Vanda
Ranch Hand

Joined: Mar 18, 2003
Posts: 281
Check out the "Pattern" class in the java documentation.

The nice thing about Standards is that there are so many to choose from!
I agree. Here's the link:
subject: Letters only in JOptionPane?
It's not a secret anymore!