This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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: 19674
    
  18

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: keyListner