public void actionPerformed(ActionEvent ae){
String userName = userNameTxt.getText();
char[] pass = password.getPassword();
}
I want to validate the above fields( its username and password) I want to take only alohabet(a-z) in username and a-z, 0-9 in password how to do this ? I am new to swing