getText() vs getPassword()
I'm currently designing a login system for a make-believe company, right now all I have is the Main login, which needs a lot of cleaning up. Below is my login handler. private class LoginButtonHandler implements ActionListener { public void actionPerformed(ActionEvent e) { if(_uid.getText().equalsIgnoreCase("Nathan") && _pwd.getText().equals("password")) { JOptionPane.showMessageDialog(null, "Congratulations on logging in!"); } else { JOptionPane.showMessageDialog(null, "Error on login!"); } } } As is, this works perfectly fine, but when I change it to _pwd.getPassword.equals("password") it