title: Check if JTextField contains only letters or numbers
body: <p>I have a JTextField where the user can type anything. What is a convenient way to check if the String of TextField.getText() does contain letters or numbers only? Basically I just want to avoid any other symbol (e.g. _^$. etc) </p>
  
  <p>Thank you in advance</p>