title: Setting the maximum value that can be entered into a JFormattedTextField
body: <p>I have the following code which only allows one numerical value to allowed in the field: </p>
  
  <pre><code>try {
    MaskFormatter deckLevelEntry = new MaskFormatter("#");
    deckLevelEntry.setPlaceholderCharacter('_');
  
    deckLevelEntryField = new JFormattedTextField(deckLevelEntry);
    detailsPanel.add(deckLevelEntryField);
    wholeFramePanel.add(detailsPanel);
    frame3.add(wholeFramePanel);
    frame3.setVisible(true);
    } catch (Exception ex) {
    }
  </code></pre>
  
  <p>However, is there a way, if so how, to set the maximum numerical value to be entered? by this I mean I want the following value's to be accepted in the <code>JFormattedTextField</code>: 1,2,3 and 4. Anything above 4 should not be allowed to entered. The same applies for the value of 0. </p>