Password protection

Hi

I am developing a java application using swing. I need to protect my application using password(which can be hardcoded for the first time). But I want to give an option to change the password so that once changed,user should only be able to run the application using the new password. Can anyone tell me how this is achieved in programming and can you give me a sample code. Any help would be highly appreciated.

Thanks in advance

Naizam

[467 byte] By [naizama] at [2007-11-27 0:14:12]
# 1
Adding one more information....this application does not have/use database to store password and restore themRegardsNaizam
naizama at 2007-7-11 21:59:06 > top of Java-index,Java Essentials,Java Programming...
# 2
You can use any file to store your encrypted password.save MD5 of that file somewhere ( may be in registry ). so if anyone try to temperthe file then you can tell the user that the settings are corrupted and only Admin User can change it.
patelss23a at 2007-7-11 21:59:06 > top of Java-index,Java Essentials,Java Programming...
# 3

Hi

Thanks a lot it worked..i got a sample code and did the encryption and decryption and it worked. Took me two days:-) . I am quite new to swing applications. In my application i have a frame. I have a panel above the frame. The panel has a button. When i click the button I want another panel to be displayed on the frame and the first panel shuold not be dispalyed anymore? Is it a feasible situation? Or the only way is to delete the existing components on the first panel and then make it look like the second panel? please provide some help. I am in very bad state with this swing...

Thanks in advance

naizama at 2007-7-11 21:59:06 > top of Java-index,Java Essentials,Java Programming...