How to launch an Applet from a User name and password Applet
Hello to all,
I was wondering if someone is kind enough to offer me some help. I have created a simple Java applet and a user login and password applet, Both compile and work fine individually.
What I want is the Login applet to launch the main applet that I'm using. So at the end of my login applet I have one IF statements as follows:
public void paint(Graphics g)
{
if(blnCorrect)
g.drawString("Correct! Successful Login.", 50, 100);
else
g.drawString("Invalid username or password.", 50, 100);
}
}
I was wondering if there is a way of launching the main applet called balderdash using the true IF statement that says successful login. I have tried the get method but to no avail. I am using blueJ as a programme.
Any help would be greatly appreciated.
Kent
Re: How to launch an Applet from a User name and password Applet
Re: How to launch an Applet from a User name and password Applet
Have the main JApplet open a JOptionPane that holds a JPanel with your a JTextField and a JPasswordField and have the user sign in with the JOptionPane. After the option pane closes, check the contents of the text/password fields and then have your applet change its behavior depending on these results.