Solved

setEchoCharacter problem in Netscape for BSDI

Posted on 1997-05-08
2
246 Views
Last Modified: 2010-05-18
In an applet I'm working on, when I set a textfield's
echo character (via setEchoCharacter) to '\0' to reset it
to normal operation after setting it to '*' for password
entry, the textfield becomes unusable (ie: does not accept
keyboard input).  This is only a problem under Netscape for
UNIX (FreeBSD and BSDI... maybe others also).

Is there a work around for this bug?
0
Comment
Question by:dsnider
2 Comments
 
LVL 6

Accepted Solution

by:
jpk041897 earned 20 total points
ID: 1220249
According to sun documentation in JDK 1.02, there is no way that you can reset a textboxs echo character back to normal operation, although you can set it to a different echo character.. Its documented as a "feature" not a bug.

I'm not sure about 1.1 but I belive this behaviour was maintained. At any rate, if you are using Netscap 3.x, you are using jdk 1.02 so the particular issue is moot.

Workarround:

Place 2 textboxes in the same place placed so that they both ocupy the same coordinates inside the frame. Say txt1 and passtxt. Then in the init method() or equivalent do:

txt1.enable(false);
txt1.setVisible(false);
passtxt.enable(true);
passtxt..setVisible(true);

Once you have procesed the event for the password, you can end the event by inverting the display logic.

Hope this helps.
0
 

Author Comment

by:dsnider
ID: 1220250
I figured I'd have to resort to such measures... I just don't
understand why setEchoCharacter('\0') works in just about EVERY
JAVA implementation there is EXCEPT _some_ versions of Netscape.

0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to implement Singleton Design Pattern in Java.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question