1char text_in_patient_contact = evt.getKeyChar();
2 if (Character.isDigit(text_in_patient_contact)||Character.isISOControl(text_in_patient_contact)) {
3 medicine_name_input.requestFocus();
4 patient_input_error.setText("");
5 }
6 else{
7 patient_input_error.setText("Worong Phone");
8 }