title: Java TextField question
body: <p>I am trying to build a custom text field class that accepts lengths (the span of aircraft wings, for example).  I can set default unit system such as "inches", "feet", "meters" etc. but I would also like to be able to input lengths that are not in the default unit system. </p>
  
  <p>So for example, if my default unit system is "meters", I would like to be able to input "10.8 ft" in my text field and then convert from ft to meters. </p>
  
  <p>Does anyone know if there is an example of this type of coding? I have searched and found a text field that only accepts numerics (in <a href="http://www.java2s.com/Code/Java/Swing-JFC/NumericTextField.htm" rel="nofollow">NumericTextField</a>), but this does not suit my needs because I would like to input "10 ft" or "8.5 m".  </p>