Java Swing Text Format createFormatter(String s)

Here you can find the source of createFormatter(String s)

Description

create Formatter

License

Open Source License

Declaration

public static MaskFormatter createFormatter(String s) 

Method Source Code

//package com.java2s;

import javax.swing.text.MaskFormatter;

public class Main {
    public static MaskFormatter createFormatter(String s) {
        MaskFormatter formatter = null;
        try {/*from  ww  w  .ja  va 2  s.c o m*/
            formatter = new MaskFormatter(s);
        } catch (java.text.ParseException exc) {
            System.err.println("formatter is bad: " + exc.getMessage());
            System.exit(-1);
        }
        return formatter;
    }
}

Related

  1. buildIntegerField(int min, int max)
  2. 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)
  3. createFormattedDateField(DateFormat dfFormat, boolean bOverwriteMode)
  4. createFormatterMask(final String mask)
  5. createIntegerFormatter(int minimum, int maximum)
  6. createMaskFormatter(final String s)
  7. dataFormatada(Calendar cal)