🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Problem with JPasswordField in JBuilderX

#935
From: Kevin Dean
Date: Fri, 14 May 2004 12:25
51 lines
2734 bytes
The problem is the way you're using the password field.  The getPassword()
method returns an array of char; when you call toString() on the result, it
gives you the type and address, not a string of the array.

To convert it to a string, do the following:

String password = new String(passwordField.getPassword());

-- 
Check out our latest white papers at
http://www.datadevelopment.com/papers/index.html

BladeNET Scores With Borland Enterprise Tools
Team Development with JBuilder and Borland Enterprise Server

Dolphin Data Development Ltd.
http://www.datadevelopment.com/

"Dominique Descamps" <dominique.descamps@alcatel.be> wrote in message
news:40A34244.D48DC3D@alcatel.be...
> Good morning,
> I have an application, using a JPasswordField, that I created using
> Borland JBuilder8.
> Now I am continuing developping this applciation using JBuilderX. In
> order to make this work, I had to add the registry settings concerning
> the JRE 1.4 environment.
> Now my application is not able to retrieve the password from the
> mentioned field anymore using the method "getPassword( )": the result of
> this method is different each time it is called.
>
> I see following possible problems:
> 1. the component, used in JBuilderX, is not stable.
> 2. my registry settings are wrong.
> 3. there is another problem.
>
> Could you help me out?
> 1. Could you tell me where I can find a file, containing a stable
> JPassWordField component?
> 2. My settings under "\HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime
> Environment" are:
> JavaHome "C:\Program Files\JBuilderX\jdk1.4\jre"
> MicroVersion "0"
> RunTimeLib "C:\Program Files\...\client\jvm.dll"
> Can this be correct?
> 3. HEEEEELP!!!
>
> Best regards
> Dominique Descamps
> Software Engineer
> Alcatel Bell, Belgium
>
Technical Details
Message-ID: <40a4bb6d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news2.google.com!news.maxwell.syr.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <40A34244.D48DC3D@alcatel.be>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,1de8d209580de4bb
X-Google-Attributes: gid111d45,public
From: "Kevin Dean" <NkOdSePaAnM@datadevelopment.com>
Newsgroups: borland.public.jbuilder.java.swing
References: <40A34244.D48DC3D@alcatel.be>
Subject: Re: Problem with JPasswordField in JBuilderX
Date: Fri, 14 May 2004 08:25:33 -0400
Lines: 53
Organization: Dolphin Data Development Ltd.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 24.57.150.243
Message-ID: <40a4bb6d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1084537709 24.57.150.243 (14 May 2004 05:28:29 -0700)
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news2.google.com!news.maxwell.syr.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail