title: Numbers length of JFormattedTextField mask Java
body: <p>I'm developing an desktop application with java, right now I'm at the point of registering person data. One of the fields of the person form is "DocumentTextField" which holds the Identification Document and Number, that's why I tried to use a JFormattedTextField mask, to help user with the format to this field.</p>
  
  <p>Basically, I just used the AbstracFormatterFactory to create the mask:</p>
  
  <p>Mask = UU - ########## to get something like (PP-0123456789)</p>
  
  <p>It does work perfecly on the fly, the user just type "pp0123456789" and the mask become this to "PP-0123456789" the point is the numbers length, as you can see on my mask, i declare 10 numbers (##########) but in fact, It could be lower than 10 numbers or even Higher. It does only work with 10 numbers, if user type lower than 10 numbers, the JFormattedTextField resset to empty, the same thing happen if user type more than 10 numbers.</p>
  
  <p>is there any way to declare the range (numbers length) of this? some document are just 5 numbers (PP-01234). </p>
  
  <p>Thank you so much in advance by reading this and trying to help.</p>