|
-
May 4th, 2000, 10:47 AM
#1
setting maximum length for TextField
I want to have the length of the input value in the textfield to be limited. But the displayed length of textfield may be more.
This feature is available in html forms wherein you can easily specify Maxlength and minLength also.
I want the same with applets. i tried setbounds() method but it is to resize and move the field.
Thanks for your help.
-
May 5th, 2000, 01:17 AM
#2
Re: setting maximum length for TextField
HI,
As far as I know, there is no method to set the length property in the TextField. This is a feature(bug) in TextField. one method of achieving this is to write a listener which is called whenever a char is entered and process the length. this is nothing but implementing the Length property by yourself.
Kalyan
-
May 6th, 2000, 05:43 AM
#3
Re: setting maximum length for TextField
hello,
it is better to use java.awt.event.KeyEvent.conume() to stop entry
into textfield after some length();
have good programming
k_venkurao
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|