0

How would I go about making JTextField allow the user to input only numbers 0 - 9? I looked into JFormattedTextField but it doesnt seem to be what I need. Would I have to code it to check the users' input everytime? Is there a simpler way?

2
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by jetru
0

formatted text field supplys all you need to do this ?

it will defnatel do what you want it to.

if you have a go and post code then we can show you what your doing wrong.

0

Got it..,
I used the MaskFormatter class to make it do what I wanted.
thanks

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.