| Package | Description | 
|---|---|
| java.text | Provides classes and interfaces for handling text, dates, numbers, and messages
in a manner independent of natural languages. | 
| 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 | Class and Description | 
|---|---|
| class  | ChoiceFormatA  ChoiceFormatallows you to attach a format to a range of numbers. | 
| class  | DateFormatDateFormatis an abstract class for date/time formatting subclasses which
 formats and parses dates or time in a language-independent manner. | 
| class  | DecimalFormatDecimalFormatis a concrete subclass ofNumberFormatthat formats decimal numbers. | 
| class  | MessageFormatMessageFormatprovides a means to produce concatenated
 messages in a language-neutral way. | 
| class  | NumberFormatNumberFormatis the abstract base class for all number
 formats. | 
| class  | SimpleDateFormatSimpleDateFormatis a concrete class for formatting and
 parsing dates in a locale-sensitive manner. | 
| Modifier and Type | Method and Description | 
|---|---|
| Format[] | MessageFormat. getFormats()Gets the formats used for the format elements in the
 previously set pattern string. | 
| Format[] | MessageFormat. getFormatsByArgumentIndex()Gets the formats used for the values passed into
  formatmethods or returned fromparsemethods. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | MessageFormat. setFormat(int formatElementIndex,
         Format newFormat)Sets the format to use for the format element with the given
 format element index within the previously set pattern string. | 
| void | MessageFormat. setFormatByArgumentIndex(int argumentIndex,
                        Format newFormat)Sets the format to use for the format elements within the
 previously set pattern string that use the given argument
 index. | 
| void | MessageFormat. setFormats(Format[] newFormats)Sets the formats to use for the format elements in the
 previously set pattern string. | 
| void | MessageFormat. setFormatsByArgumentIndex(Format[] newFormats)Sets the formats to use for the values passed into
  formatmethods or returned fromparsemethods. | 
| Constructor and Description | 
|---|
| JFormattedTextField(Format format)Creates a  JFormattedTextField. | 
| Modifier and Type | Method and Description | 
|---|---|
| Format | InternationalFormatter. getFormat()Returns the format that dictates the legal values that can be edited
 and displayed. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | InternationalFormatter. setFormat(Format format)Sets the format that dictates the legal values that can be edited
 and displayed. | 
| void | NumberFormatter. setFormat(Format format)Sets the format that dictates the legal values that can be edited
 and displayed. | 
| Constructor and Description | 
|---|
| InternationalFormatter(Format format)Creates an  InternationalFormatterwith the specifiedFormatinstance. | 
 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, 2014, Oracle and/or its affiliates.  All rights reserved.