| 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 | 
|---|---|
| protected DocumentFilter | JFormattedTextField.AbstractFormatter. getDocumentFilter()Subclass and override if you wish to provide a
  DocumentFilterto restrict what can be input. | 
| Modifier and Type | Method and Description | 
|---|---|
| DocumentFilter | AbstractDocument. getDocumentFilter()Returns the  DocumentFilterthat is responsible for
 filtering of insertion/removal. | 
| protected DocumentFilter | DefaultFormatter. getDocumentFilter()Returns the  DocumentFilterused to restrict the characters
 that can be input into theJFormattedTextField. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | AbstractDocument. setDocumentFilter(DocumentFilter filter)Sets the  DocumentFilter. | 
 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.