wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes JPassowrldField Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JPassowrldField" Watch "JPassowrldField" New topic
Author

JPassowrldField

Larry Lai
Ranch Hand

Joined: May 13, 2002
Posts: 44
Hi everyone,
How're you ?

Do you know how to make the password in the JPasswordField getting the actionperform
then matching that "Javaranch" is the password
then if it's "Javaranch", log on.
Thanks..
Larry
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
String password = new String(passwordTextField.getPassword()).trim();
if (password.equals(someStoredPassword)) {
//allow login
} else {
//invalid password
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JPassowrldField