This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 38045
    
  22
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
 
Similar Threads
Reset of JTextField data
Which Swing component to use ?
JFormattedTextField
Strange behavior of the JFormattedTextField
Use mask formatter in conjunction with a DateFormatter in Swing