| Package | Description | 
|---|---|
| javax.swing | Provides a set of "lightweight"
(all-Java language) components that,
to the maximum degree possible, work the same on all platforms. | 
| javax.swing.text | Provides classes and interfaces that deal with editable
and noneditable text components. | 
| Modifier and Type | Method and Description | 
|---|---|
| JFormattedTextField.AbstractFormatter | JFormattedTextField. getFormatter()Returns the  AbstractFormatterthat is used to format and
 parse the current value. | 
| abstract JFormattedTextField.AbstractFormatter | JFormattedTextField.AbstractFormatterFactory. getFormatter(JFormattedTextField tf)Returns an  AbstractFormatterthat can handle formatting
 of the passed inJFormattedTextField. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | JFormattedTextField. setFormatter(JFormattedTextField.AbstractFormatter format)Sets the current  AbstractFormatter. | 
| Constructor and Description | 
|---|
| JFormattedTextField(JFormattedTextField.AbstractFormatter formatter)Creates a  JFormattedTextFieldwith the specifiedAbstractFormatter. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | DateFormatterDateFormatter is an  InternationalFormatterthat does its
 formatting by way of an instance ofjava.text.DateFormat. | 
| class  | DefaultFormatterDefaultFormatterformats arbitrary objects. | 
| class  | InternationalFormatterInternationalFormatterextendsDefaultFormatter,
 using an instance ofjava.text.Formatto handle the
 conversion to a String, and the conversion from a String. | 
| class  | MaskFormatterMaskFormatteris used to format and edit strings. | 
| class  | NumberFormatterNumberFormattersubclassesInternationalFormatteradding special behavior for numbers. | 
| Modifier and Type | Method and Description | 
|---|---|
| JFormattedTextField.AbstractFormatter | DefaultFormatterFactory. getDefaultFormatter()Returns the  JFormattedTextField.AbstractFormatterto use
 as a last resort, eg in case a display, edit or nullJFormattedTextField.AbstractFormatterhas not been specified. | 
| JFormattedTextField.AbstractFormatter | DefaultFormatterFactory. getDisplayFormatter()Returns the  JFormattedTextField.AbstractFormatterto use
 if theJFormattedTextFieldis not being edited and either
 the value is not-null, or the value is null and a null formatter has
 has not been specified. | 
| JFormattedTextField.AbstractFormatter | DefaultFormatterFactory. getEditFormatter()Returns the  JFormattedTextField.AbstractFormatterto use
 if theJFormattedTextFieldis being edited and either
 the value is not-null, or the value is null and a null formatter has
 has not been specified. | 
| JFormattedTextField.AbstractFormatter | DefaultFormatterFactory. getFormatter(JFormattedTextField source)Returns either the default formatter, display formatter, editor
 formatter or null formatter based on the state of the
 JFormattedTextField. | 
| JFormattedTextField.AbstractFormatter | DefaultFormatterFactory. getNullFormatter()Returns the formatter to use if the value is null. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | DefaultFormatterFactory. setDefaultFormatter(JFormattedTextField.AbstractFormatter atf)Sets the  JFormattedTextField.AbstractFormatterto use as
 a last resort, eg in case a display, edit or nullJFormattedTextField.AbstractFormatterhas not been
 specified. | 
| void | DefaultFormatterFactory. setDisplayFormatter(JFormattedTextField.AbstractFormatter atf)Sets the  JFormattedTextField.AbstractFormatterto use if
 theJFormattedTextFieldis not being edited and either
 the value is not-null, or the value is null and a null formatter has
 has not been specified. | 
| void | DefaultFormatterFactory. setEditFormatter(JFormattedTextField.AbstractFormatter atf)Sets the  JFormattedTextField.AbstractFormatterto use if
 theJFormattedTextFieldis being edited and either
 the value is not-null, or the value is null and a null formatter has
 has not been specified. | 
| void | DefaultFormatterFactory. setNullFormatter(JFormattedTextField.AbstractFormatter atf)Sets the formatter to use if the value of the JFormattedTextField is
 null. | 
| Constructor and Description | 
|---|
| DefaultFormatterFactory(JFormattedTextField.AbstractFormatter defaultFormat)Creates a  DefaultFormatterFactorywith the specifiedJFormattedTextField.AbstractFormatter. | 
| DefaultFormatterFactory(JFormattedTextField.AbstractFormatter defaultFormat,
                       JFormattedTextField.AbstractFormatter displayFormat)Creates a  DefaultFormatterFactorywith the specifiedJFormattedTextField.AbstractFormatters. | 
| DefaultFormatterFactory(JFormattedTextField.AbstractFormatter defaultFormat,
                       JFormattedTextField.AbstractFormatter displayFormat,
                       JFormattedTextField.AbstractFormatter editFormat)Creates a DefaultFormatterFactory with the specified
 JFormattedTextField.AbstractFormatters. | 
| DefaultFormatterFactory(JFormattedTextField.AbstractFormatter defaultFormat,
                       JFormattedTextField.AbstractFormatter displayFormat,
                       JFormattedTextField.AbstractFormatter editFormat,
                       JFormattedTextField.AbstractFormatter nullFormat)Creates a DefaultFormatterFactory with the specified
 JFormattedTextField.AbstractFormatters. | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2016, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.