Java Swing

Homework giving you a headache? Math gives you a migraine? Can't quite figure out how to do something in photoshop? Never fear, the other members of CAA share their expertise in this forum.

Java Swing

Postby skynes » Tue Mar 09, 2004 3:46 am

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
I am the Reaper of Souls... and it's harvest time.

Image
User avatar
skynes
 
Posts: 742
Joined: Mon Mar 01, 2004 8:39 am
Location: N Ireland

Postby JediSonic » Tue Mar 09, 2004 6:02 am

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?
User avatar
JediSonic
 
Posts: 1359
Joined: Thu Oct 16, 2003 12:33 pm
Location: The Bible Belt :D

Postby skynes » Tue Mar 09, 2004 6:33 am

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.
I am the Reaper of Souls... and it's harvest time.

Image
User avatar
skynes
 
Posts: 742
Joined: Mon Mar 01, 2004 8:39 am
Location: N Ireland

Postby JediSonic » Tue Mar 09, 2004 11:33 am

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:
User avatar
JediSonic
 
Posts: 1359
Joined: Thu Oct 16, 2003 12:33 pm
Location: The Bible Belt :D


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 198 guests