|
I haven't done it in Java but many times in HTML
I'll run a script each time a key is pressed that measures the length of
the string in the textarea and if greater than a specified length I'll
do a mid function to crop the string back to the length I want and put my string
back in the field. I would imagine you could do the
same thing with a JTextfield if someone doesn't tell you an
easier way.
Just a thought!
Scott
|