private void NamaKeyPressed(java.awt.event.KeyEvent evt) {
if(evt.getKeyCode() == evt.VK_ENTER)
Password.requestFocus();
}
private void PasswordKeyPressed(java.awt.event.KeyEvent evt) {
if(evt.getKeyCode() == evt.VK_ENTER)
Login.doClick();
}
private void LoginActionPerformed(java.awt.event.ActionEvent evt) {
String user = "ip";
String pass = "123456";
if(user.equalsIgnoreCase(Nama.getText()) && pass.equalsIgnoreCase(Password.getText())){
this.setVisible(false);
new UtamaFrame().setVisible(true);
}
else {
javax.swing.JOptionPane.showMessageDialog(null,"kombinasi nama dan password salah");
Nama.setText("");
Nama.requestFocus();
Password.setText("");
}
}
public static void main(String[] args) {
new LoginFrame().setVisible(true);
}
}