Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Swing / AWT / SWT
Search Coderanch
Advance search
Google search
Register / Login
Forums
Register
Login
Java
»
Swing / AWT / SWT
JFormattedTextField validation
Campbell Ritchie
,
Marshal
staff
Jan 31, 2010 13:59:42
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
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
Jan 31, 2010 15:58:58
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
a JTextField with DocumentFilter set might suit you better
pete stein
,
Bartender
staff
Jan 31, 2010 16:26:44
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
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
Feb 08, 2010 09:18:19
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
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!
Post by:
autobot
Clowns were never meant to be THAT big! We must destroy it with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
This thread has been viewed 1376 times.
Similar Threads
Reset of JTextField data
JFormattedTextField
Use mask formatter in conjunction with a DateFormatter in Swing
Strange behavior of the JFormattedTextField
Which Swing component to use ?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
More...
All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 17:17:32
.