title: jTextField validation for numbers and one decimal point?
body: <p>I need to set a jTextField to accept only numbers and one decimal point.Nothing else. Decimal point can't be typed more than once and no other characters are allowed. How can I do this?</p>
  
  <p>I typed this code. but it doesn't work well. I mean it accept Strings until i type a decimal point     </p>
  
  <pre><code>    if (!Character.isDigit(evt.getKeyChar()) &amp; crqty.getText().indexOf(".") != -1) {
          evt.consume();
      }
  </code></pre>