Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / February 2004

Tip: Looking for answers? Try searching our database.

JPasswordField GetPassword method.

Thread view: 
Max - 28 Feb 2004 07:24 GMT
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.
Christophe Vanfleteren - 28 Feb 2004 08:30 GMT
> Hi all,
> I'm using the JPasswordField to get the user insert password. Previously
[quoted text clipped - 8 lines]
>
> 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().

Signature

Kind regards,
Christophe Vanfleteren

Max - 28 Feb 2004 12:16 GMT
Hi Chris,

I've try getPassword b4, but i'm currently trying to store the value into a
table, using getPassword() return some unknown char[] which i don't really
know how to manage it. Any idea??

Thanks.

Max.

> > Hi all,
> > I'm using the JPasswordField to get the user insert password. Previously
[quoted text clipped - 18 lines]
> Kind regards,
> Christophe Vanfleteren
Christophe Vanfleteren - 28 Feb 2004 12:21 GMT
Top posting corrected.

>> > Hi all,
>> > I'm using the JPasswordField to get the user insert password.
[quoted text clipped - 21 lines]
>
> Hi Chris,

It's Christophe :)

> I've try getPassword b4, but i'm currently trying to store the value into
> a table, using getPassword() return some unknown char[] which i don't
> really know how to manage it. Any idea??

By storing in a table, do you mean storing the value in a DB?

Could you show the code where you try to do that?
You should be able to just create a String from the char[], and store that.

> Thanks.
>
> Max.

Signature

Kind regards,
Christophe Vanfleteren



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.