TextBox의 이름을 'Aime'으로, TextBox의 이름을 'Joy'와 동일하게 설정하면 "User Name and 암호 일치! " ? 누군가? 제발 도와주세요 :(TextField에서 var 값을 설정하는 방법은 다른 경우
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!");
}
유 귀하의 요구 사항을 설명 할 수 있습니까? – user3808887
이 코드는 컴파일도 수행합니까 ?? –
안녕하세요. 로그인 양식입니다. 교수님이 textfield1에 사용자 이름을 입력하고 textfield2에 암호를 입력하라고 요청하고 필요한 사용자 이름과 암호에 "사용자 이름 및 암호 일치!"라는 텍스트가 일치하는지 묻습니다. JOptionPane를 통해 인쇄되고, 그렇지 않으면 "User Name and Password Invalid!"가 인쇄됩니다. –