I'm using VA for Java 3.02 and of course, I am a true beginner. I've kind of been playing around with it for the last week. My problem is I want to limit the number of characters that a user can key in a text field. I can't seem to figure out how to do this. Can someone please help me? I would be forever grateful. Thanks!
That is really IDE independent so this might not be the best forum to post Your question in. BTW you can either use a constructor JTextField(int columns) which constructs a new empty TextField with the specified number of columns or u can use setColumns(int columns) method that sets the number of columns in this TextField. Vladan
Joined: Feb 28, 2001
Hello. Thanks for reply. Sorry about posting this in the wrong forum. I tried your suggestions and it did change the number of columns in my text field. However, it still let me key as many characters as I wanted. (Ex. specified 15 columns, let me key as many characters as I wanted. It just kept scrolling the text over. I want to be able to key ONLY 15 characters). Any other suggestions. Your help is very appreciated!