• Post Reply Bookmark Topic Watch Topic
  • New Topic

KeyListener

 
vasu kasukurthi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rob Camick
Ranch Hand
Posts: 2700
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the JPasswordField API and you will find a link to the Swing tutorial on "How to Use Text Fields", which in turn will show you how to limit the number of characters entered into a text component.
 
Rob Spoor
Sheriff
Posts: 20820
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, search first. This question has been asked, and answered, many times before in this forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!