I l@ve RuBoard |
![]() ![]() |
20.7 The NumberFormatter ClassNumberFormatter is a subclass of InternationalFormatter that uses an object of type java.text.NumberFormat as its format. JFormattedTextField instantiates a NumberFormatter for itself if you pass a subclass of Number or a java.text.NumberFormat into its constructor. With a subclass of Number, the format is localized to the current locale. Again, this is usually what you want, but if you want your program to use the same number format no matter where in the world it is run, construct your JFormattedTextField with a specific java.text.NumberFormat. 20.7.1 PropertiesNumberFormatter does not define any properties beyond those it inherits (see Table 20-6). The minimum and maximum properties can be handy if you want the field to be restricted to a specific range. 20.7.2 Constructors
20.7.3 Public Method
20.7.4 The JFormattedTextField.AbstractFormatterFactory ClassAbstractFormatterFactory is an abstract inner class of JFormattedTextField that defines the basic API (a single method) for formatter factories. There is usually no reason to extend AbstractFormatterFactory directly. Instantiate a DefaultFormatterFactory instead. Each JFormattedTextField has its own factory. See the description of formatter factories in Section 20.1 earlier in this chapter. 20.7.4.1 Public method
![]() |
I l@ve RuBoard |
![]() ![]() |