I realize this is somewhat late, but I have an answer to the question to limiting the input in a JTextField. Maybe someone else searching for the same answer will find it.
You can extend the DefaultStyledDocument class which will allow you to
test the data being entered into a JTextField as it is being entered. You will need to declare the extended document class and pass it the JTextField as an argument. In your initialization you will need to use the setDocument() method of the JTextField in question to this instance of the document class. The following code limits the range of input into a JTextField from 0 to 100. The code causes a beep and an error message when you get beyond these values.
[This message has been edited by Lon Allen (edited August 07, 2001).]