I'm having trouble with using jbuttonactionperformed to receive a username and password in java. What is wrong with this code. I searched in google and saw that a character array is used to store getPassword return.Is it wrong?
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
char[] input = {'r','o','o','t'};
if (jTextField1.getText() == "admin" && jPasswordField1.getPassword() == input) {
srchnm.main(null);
}
}