title: How to use JFormattedTextField allowing only letters and numbers
body: <p>I have this code and cannot get <code>MaskFormatter</code> right<br>
  <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/formattedtextfield.html#maskformatter" rel="nofollow">maskformatter</a></p>
  
  <pre><code>MaskFormatter formatter = null;
    try {
      formatter = new MaskFormatter("HHHHHHH");
    } catch (ParseException e) {
      e.printStackTrace();
    }
  
  txtTroll = new JFormattedTextField(formatter);
  </code></pre>
  
  <p>I need Any hex character (0-9, a-z or A-Z) and the "H" should<br>
  give me only (0-9, a-z or A-Z) but im getting it wrong.</p>
  
  <p>When i type text only capital letters are typed and it's slow to<br>
  and when i click away from the <code>txtTroll</code> all letters vanish </p>