| Package | Description | 
|---|---|
| java.text | Provides classes and interfaces for handling text, dates, numbers, and messages
in a manner independent of natural languages. | 
| javax.swing.text | Provides classes and interfaces that deal with editable
and noneditable text components. | 
| Modifier and Type | Class and Description | 
|---|---|
| static class  | DateFormat.FieldDefines constants that are used as attribute keys in the
  AttributedCharacterIteratorreturned
 fromDateFormat.formatToCharacterIteratorand as
 field identifiers inFieldPosition. | 
| static class  | MessageFormat.FieldDefines constants that are used as attribute keys in the
  AttributedCharacterIteratorreturned
 fromMessageFormat.formatToCharacterIterator. | 
| static class  | NumberFormat.FieldDefines constants that are used as attribute keys in the
  AttributedCharacterIteratorreturned
 fromNumberFormat.formatToCharacterIteratorand as
 field identifiers inFieldPosition. | 
| Modifier and Type | Method and Description | 
|---|---|
| Format.Field | FieldPosition. getFieldAttribute()Returns the field identifier as an attribute constant
 from one of the  Fieldsubclasses. | 
| Constructor and Description | 
|---|
| FieldPosition(Format.Field attribute)Creates a FieldPosition object for the given field constant. | 
| FieldPosition(Format.Field attribute,
             int fieldID)Creates a  FieldPositionobject for the given field. | 
| Modifier and Type | Method and Description | 
|---|---|
| Format.Field[] | InternationalFormatter. getFields(int offset)Returns the  Format.Fieldconstants associated with
 the text atoffset. | 
 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, 2025, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.