title: Java - pattern for textfield
body: <p>I want user to type some text in JTextField and it must match some "pattern".</p>
  
  <p>Pattern is - int x, String("hours"), so f.e. <strong>5 hours</strong> ; <strong>12 hours</strong> etc.</p>
  
  <p>I googled something with patterns, matchers, regex or whatever, and I am pretty confused.</p>
  
  <p>If someone ever experienced similar problem, or knows how to handle mine, please post.
  Or at least some API to read ...</p>