GeeCON Prague 2014*
The moose likes I/O and Streams and the fly likes keyListner Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "keyListner" Watch "keyListner" New topic
Author

keyListner

vasu kasukurthi
Greenhorn

Joined: Dec 14, 2009
Posts: 9
I have to implement key listner for passwordfield, if password field length is greaterthan 12 then the field doesn't allow to type text in passwordfields.

Thanks in advance
Kaustav Ganguly
Greenhorn

Joined: Dec 14, 2009
Posts: 28
I think if you are developing a web application using HTML then easiest way would be to use the password type in html and provide the maxlength attribute as 12. you dont need any key listener for this,

try this "<input type="password" size="12" maxlength="12" />"

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

And for Swing applications, do a search in our Swing / AWT forum. This question has been asked, and answered, before.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
Consider Paul's rocket mass heater.
 
subject: keyListner