Hi. I have a textfield that is supposed to accept numbers from 1 to 10000. The problem I am facing is that if I do not put a setAllowsInvalid to true, I can type garbage in the textfield and I don't want that. I have also set a min and max value, min being 1, max being 10000. The problem is, when I enter something in the textfield, I want to be able to erase what is there first and then enter my new value instead of having to overwrite the existing values, that means I want to be able to backspace to an empty textfield and, not be able to enter characters other than numbers between 1 and 10000. Right now, when I backspace, it doesn't let me eliminate the last character and also when I try to enter a new value, I need to place the cursor at the front of the textfield and overwrite the characters. I just want to be able to erase what is there, with mouse, delete or backspace and see it empty, then enter my new value. A quick response would be very much appreciated. Thanks to all. - Chad
Joined: Sep 29, 2000
I will move this to the swing forum.
"JavaRanch, where the deer and the Certified play" - David O'Meara
Joined: Jul 15, 2006
Sorry to dig out this pretty old post. But I'm having exactly the same problem and can't work it out.