Re: JPasswordField GetPassword method.
From: Christophe Vanfleteren (c.v4nfl3t3r3n_at_pandora.be)
Date: 02/28/04
- Next message: hiwa: "Re: strangely inverted text in JEditorPane"
- Previous message: Advocated: "Re: Java and mysql together"
- In reply to: Max: "JPasswordField GetPassword method."
- Next in thread: Max: "Re: JPasswordField GetPassword method."
- Reply: Max: "Re: JPasswordField GetPassword method."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 28 Feb 2004 08:30:30 GMT
Max wrote:
> Hi all,
> I'm using the JPasswordField to get the user insert password. Previously
> it uses getText() to retrieve the password, but now the getText() for
> JPasswordField has been deprecated, the getPassword is recommended
> instead. But i have no idea how to retrieve the data from the
> JPasswordField.
>
> Do anyone have any idea?
>
> Thanks and Regards,
>
> Max.
Err, how about using getPassword() ?
It gives you a char array. You can then either create a String with it (not
recommended for the same reason getText() is deprecated), or compare it
with another char array, that you can create using
"correctpassword".toCharArray().
-- Kind regards, Christophe Vanfleteren
- Next message: hiwa: "Re: strangely inverted text in JEditorPane"
- Previous message: Advocated: "Re: Java and mysql together"
- In reply to: Max: "JPasswordField GetPassword method."
- Next in thread: Max: "Re: JPasswordField GetPassword method."
- Reply: Max: "Re: JPasswordField GetPassword method."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|