input dialog, password
807599Feb 23 2007 — edited Feb 23 2007Is there a way when you start a program it prompts you to enter a username and if correct it contiunes running the rest of the program where my GUI will display. at the moment i am using this code and method but it does not work?
do
{
userName = JOptionPane.showInputDialog("Enter user name");
}
while ((userName == USER_NAME));
if (userName == USER_NAME)
{
System.runFinalization() ;
}
else
{
System.exit(0);
}