Page 1 of 1

Java Swing

PostPosted: Tue Mar 09, 2004 3:46 am
by skynes
I'm doing a file handling Project in Java Swing. I have to make a Graphical User Interface for a CD store Stock Control program.

Some things I need help with.

Password screen: Change the text field so that instead of showing letters it shows ****

There's more I need. I'll post it when I remember them :S

PostPosted: Tue Mar 09, 2004 6:02 am
by JediSonic
Hmm... I haven't used Java in a while, but I remember one time when I was wondering exactly the same thing! Unfortunately I never found out the answer :lol:

If all else fails, you could just copy the character into an independant password string, then just replace the character in the textfield with a '*'. In other words, when the person presses 'enter', have it submit the string you copied the typed character into; not the asterisks. Like I said, I haven't used java in a while; there might not be any way to do my idea without showing a flicker of the letter before it is replaced with '*'.

Does that help any?

PostPosted: Tue Mar 09, 2004 6:33 am
by skynes
Nope sorry. But don't worry I did a good chunk of research today and got it sorted.

There's a form of text field called a Password field. Using EchoChar you can change the letters into asterisks. It records the password as an array of characters to stop bots from stealing it.

If I can remember the other stuff I needed help with I'll post it but that's all for now.
Thanks anyway.

PostPosted: Tue Mar 09, 2004 11:33 am
by JediSonic
skynes wrote:Nope sorry. But don't worry I did a good chunk of research today and got it sorted.

There's a form of text field called a Password field. Using EchoChar you can change the letters into asterisks. It records the password as an array of characters to stop bots from stealing it.

If I can remember the other stuff I needed help with I'll post it but that's all for now.
Thanks anyway.



lol that is almost exactly what I said only someone did the code for you :lol: