Java Swing Text Format createMaskFormatter(final String s)

Here you can find the source of createMaskFormatter(final String s)

Description

create Mask Formatter

License

Open Source License

Declaration

public static MaskFormatter createMaskFormatter(final String s) 

Method Source Code

//package com.java2s;
// License as published by the Free Software Foundation; either

import java.text.ParseException;

import javax.swing.text.MaskFormatter;

public class Main {
    public static MaskFormatter createMaskFormatter(final String s) {
        MaskFormatter formatter = null;
        try {// w w  w  . j  a v a 2s .  c o m
            formatter = new MaskFormatter(s);
        } catch (final ParseException e) {
            throw new IllegalArgumentException(e);
        }
        return formatter;
    }
}

Related

  1. checkBoundaryCondition(final int pos, final Position.Bias b0, final Position.Bias[] biasRet, final Element neighboringElement, final boolean isLTR, final boolean toWest, final int start, final int length, final int startParagraph, final int endParagraph, final boolean nextIsLTR)
  2. createFormattedDateField(DateFormat dfFormat, boolean bOverwriteMode)
  3. createFormatter(String s)
  4. createFormatterMask(final String mask)
  5. createIntegerFormatter(int minimum, int maximum)
  6. dataFormatada(Calendar cal)
  7. findElementUp(String name, Element start)
  8. findMatchingBracket(Element el, int offset)
  9. findNext(boolean reverse, int pos)