Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cursor position in a JPasswordField

 
Barry Brashear
Ranch Hand
Posts: 303
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JPasswordField in a JDialog. The first time in the dialog it works
fine. However, on subsequent entries, when tabbing to the JPasswordField,
the cursor appears several characters into the field instead of at the
beginning. Any suggestions?

Thanks.
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you clean up the password text? Are you reusing the dialog?

--
./pope
[the_mindstorm]
 
Barry Brashear
Ranch Hand
Posts: 303
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. It is being reused. Currently reset password with a
setText( "" );
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you paste the code? It is not clear what is happening. Have you tried to select the advance space in password text? Is it always the same? Isn't it another tab character?

--
./pope
[the_mindstorm]
 
Barry Brashear
Ranch Hand
Posts: 303
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JPassword field is called mTLSupervisorEmpNumber. The code is :

mTLSupervisorEmpNumber.setText( "" );
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lol Barry. I meant all the code involving at least the password text.

--
./pope
[the_mindstorm]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic