KingCobra220
05-26-2006, 06:02 PM
How would I limit the # of characters that can be entered in a TextField in an applet I'm making? I've tried .setMaxLength(int); but thats not working. It keeps on throwing me: Can't find symbol method setMaxLength(int). Any ideas?
agent_x91
05-27-2006, 10:20 PM
As far as I know, there's no simple way method to limit the number of characters in a text field. You may need to use a listener to detect changes and stop entry to the field manually after it has reached a specific length... there may be a simpler way of doing this but I don't remember it if there is one.