# create login java program



## dashang (Sep 13, 2008)

I am *looking for code to create login java program in which user enter pass if its correct run remaining program else terminate*/   Help me guys. I am having problem with whowing '*' as display how to do it???


----------



## redhat (Sep 13, 2008)

I too once faced the same problems...
Are you using applets? or a UI? or is it just the command line??
Because if its applets or UI it can be done, I had read a article on sun Java's website for it, but in command line, its almost impossible, although I found a trick, its not very good, found it on sun's website, dont remember just now


----------



## dashang (Sep 13, 2008)

I am looking for both solutions if you have UI based  code then please tell


----------



## QwertyManiac (Sep 15, 2008)

This thread should give an acceptable solution: Mask input in Java (Thread by *redhat*)


----------



## ray|raven (Sep 15, 2008)

^QwertyM :  JPasswordField doesnt need to set .echoChar() 
Not unless you wanna show some other char specifically.


----------



## QwertyManiac (Sep 15, 2008)

Ohk, does it use asterix by default on all platforms? Windows uses a different thing so I thought maybe you had to set it that way. Wrote those on *nix though


----------



## ray|raven (Sep 15, 2008)

It is '*' by default. But i believe it changes depending on the L&F used.


----------

