Posted on 1998-11-27
I want to put a JTextField in my program and the textfield can accept n characters. If the entered characters exceed n, a beep will be generated and the >n character can't be entered anymore.
I am succeded to generate the beep if the entered character exceeds n, but I failed to stop the further entered character. That means, thought a beep can be generated if the length of entered chracters longer than n, but one can further enter characters and that's what I want to solve.
Has anyone idea?