Below is the code I am using. I have a local web site setup and and trying to password protect it. This brings up the applet but even if I write in the correct value(Test) for field myTextField, I always get dropped to the else statement. Thanks.....
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class JPasswordA extends JApplet implements ActionListener
{//1
JLabel myPassword = new JLabel("Enter A Password"

;
JTextField myTextField = new JTextField("", 15);
Font myFont = new Font("Arial", Font.BOLD + Font.ITALIC, 18);
Container con = getContentPane();
FlowLayout flow = new FlowLayout();
JLabel status = new JLabel(""

;
public void init()
{
con.setLayout(flow);
con.add(myPassword);
con.add(myTextField);
con.add(status);
myTextField.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
Object source = e.getSource();
String newText;
newText= myTextField.getText();
if (newText.equals("Test"

)
{
// you have an error
status.setText("OK"

;
}
else
{
// get the data
status.setText("Password is incorrect"

;
}
}
}//1