adding password to an app.

im somewhat new to programming in java. im in the process of making a simple app with friends/familys birthdates and dates of holidays. how would i set it up to ask for a password when entering the app and closing the app if the password is wrong?

[254 byte] By [dragon_master_mokubaa] at [2007-11-27 10:28:41]
# 1

make your own app password. :)

Yannixa at 2007-7-28 17:53:06 > top of Java-index,Java Essentials,Java Programming...
# 2

i dont know how =P

dragon_master_mokubaa at 2007-7-28 17:53:06 > top of Java-index,Java Essentials,Java Programming...
# 3

use swing in building your own app password.

Yannixa at 2007-7-28 17:53:06 > top of Java-index,Java Essentials,Java Programming...
# 4

well, you could show a JFrame with a JPasswordField at the beginning.

Then you check what the user has entered. In case its wrong, you can simply make a system.exit(0), in case its correct, you can show the main frame.

The password string itself you can either hard code into your app (which is easy - but usually not such a great idea) or you can use encryption and store your password in an external file.

regards

BugBunny

BugBunnya at 2007-7-28 17:53:06 > top of Java-index,Java Essentials,Java Programming...