Hello everyone!
I am struggling with an annoying piece of code, for the login of my launcher.
I have create a JPasswordField, variable 'password' and I want to get the text the user has typed in.
I tried to do this, but it doesn't seem to get the value...
I am struggling with an annoying piece of code, for the login of my launcher.
I have create a JPasswordField, variable 'password' and I want to get the text the user has typed in.
I tried to do this, but it doesn't seem to get the value...
login.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { char[] passes = password.getPassword(); String p = new String(passes); if(username.getText() == "test" && p.equals("test")) { JOptionPane.showMessageDialog(null, "Correct Details!"); } } });