I am new to Java, and I am trying to make 3 text fields; but I want the input in each of those text fields restricted to 1 digit(between 0-9). How can I do this?javascript: x() Confused
you could set your own document for the textfield, but a simpler solution might be to use a JSpinner
Timea Darryl
Greenhorn
Joined: Sep 13, 2005
Posts: 3
posted
0
Wow! Thanks, Michael, that is amazing. I compiled it and ran it, and it looks awesome, although I do not understand how it works. I understand the spinner, in fact I wanted to use the Choice()class, but I am restricted to JTextField or JFormattedTextField, and everything I found on the net about restricting input to the JTextField was too confusing. So now I am going to try to figure out what you did with that number limiter class. Thanks again.