can I ask how I can instantly equal my TextField named txtUserName into 'Aime' and also my txtPassword equal to 'Joy' so that it will show the message "User Name and Password Match!" ? Anyone? Please help me :(
public void actionPerformed(ActionEvent e){
if (e.getSource()== btnClear){
txtUserName.setText("");
}
if(e.getSource() == btnLogin){
if (txtUserName.setText="Aime" && txtPassword.setText="JOy")){
JOptionPane.showMessageDialog(null, "User Name and Password Match!");
}
else {
JOptionPane.showMessageDialog(null, "User Name and Password Invalid!");
}