Someone please help me!
I am attempting to creat a login type program in Java, but i can't figure out how to get it to check if the name and password are corect when you press the submit button. If there is anyone that can help me please please help, and im not totaly new to java i did a year of it already and we used to book "Head First Java" if it was in there at somepoint i missed it and woud be a great help if someone could help me with this, and also how to get the window to close and open a new window wen the name and password are correct.
Any help would be great, Thanks
The window questions are for the Swing section.
If youre totally new to GUIs then its too much to explain in a
thread anyway and you should hit a tutorial.
As for the password thing, you have to give thought to where and
how you will save the name/password. If you search the forums
you'll find a lot of information on this.
Basically it comes down to 2 questions:
(1) where will you hide the file with the information
(2) how will you obfuscate the data in the file
I believe that most people use a Hash function to store the name and
password pair. A hash is basically a (hopefully) one way transformation
of an input into a (hopefully) unique value.
So when the user enters their data you hash their name and password
and check it with the name/pass pairs you have stored somewhere.
Good luck. You have enough to go on a nice google tangent.
> I am attempting to creat a login type program in
> Java, but i can't figure out how to get it to check
> if the name and password are corect when you press
> the submit button.
http://java.sun.com/docs/books/tutorial/uiswing/events/index.html
> If there is anyone that can help
> me please please help, and im not totaly new to java
> i did a year of it already and we used to book "Head
> First Java" if it was in there at somepoint i missed
> it and woud be a great help if someone could help me
> with this, and also how to get the window to close
logonFrame.dispose();
appFrame.setVisible(true);
> and open a new window wen the name and password are
> correct.
>
> Any help would be great, Thanks