File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JFormattedTextField validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFormattedTextField validation" Watch "JFormattedTextField validation" New topic
Author

JFormattedTextField validation

Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40041
    
  28
Don't know. I presume you have looked for tutorials like this one?

I think this thread would sit better on our GUIs forum, so I shall move it.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
a JTextField with DocumentFilter set might suit you better
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Or perhaps all you need to do is use a standard JTextField and simply parse the textfield's text within a try/catch block, catching for NumberFormatException.
Nicol Green
Ranch Hand

Joined: Jan 30, 2010
Posts: 66
Yes definitely, JFormattedTextField was not the best option in my case. I will try what you proposed, and than tell you what was the best solution.

Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JFormattedTextField validation