Formatted JTextfield with format <INT>.<INT> or <INT>

Hi

I need Formatted JTextfield with format <INT>.<INT> or <INT>

First number is integer . second number -( exist only if there is a dot) integer itself which can be 1 , 10 or 11

If the number is 22.10 it should stay 22.10 , and if its 22.1 - it should stay 22.1 - 22.10 and 22.1 are different fields

with regular number formate I could have or regulat float number - where 22.10 becomes 22.1 , if I allow zero at after the decimal point then 22.1 becomes 22.10