🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #7666

Re: JPasswordText

#7666
From: Fredrik Skanberg
Date: Thu, 21 Dec 2000 07:57
22 lines
1470 bytes
The getPassword() method returns a character array.

You can use the following code to create a string:

String myPassword = new String(passwordField.getPassword())

If a method is "deprecated" it means that Sun has introduced a new
better way to do the same thing.

/Fredrik

Chris wrote:
> 
> Hi
> 
> How can I get the text content of a JPasswordText component to compare it to
> a string ?
> JPasswordText.getText() is "deprecated" (what does it mean BTW ?)
> JPasswordText.getPassword() seems to give me a "crypted" string such as
> [4%C7 when the typed password was "go"...
> 
> Thx
Technical Details
Message-ID: <3A41B7CF.C40F7BFE@algonet.se>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!216.227.56.88.MISMATCH!telocity-west!TELOCITY!HSNX.atgi.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!193.14.71.253
References: <3a41335e_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,e075d7bfad5ce5ae
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2000-12-20 23:58:29 PST
Message-ID: <3A41B7CF.C40F7BFE@algonet.se>
Date: Thu, 21 Dec 2000 08:57:03 +0100
From: Fredrik Skanberg <skanberg@algonet.se>
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing
Subject: Re: JPasswordText
References: <3a41335e_2@dnews>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 193.14.71.253
X-Trace: 20 Dec 2000 23:57:18 -0800, 193.14.71.253
Lines: 22
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!216.227.56.88.MISMATCH!telocity-west!TELOCITY!HSNX.atgi.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!193.14.71.253