[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 275
  • Last Modified:

setEchoCharacter problem in Netscape for BSDI

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
dsnider
Asked:
dsnider
1 Solution
 
jpk041897Commented:
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
 
dsniderAuthor Commented:
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now