javax.swing.text
public class NumberFormatter extends InternationalFormatter
NumberFormatter
is an {@link InternationalFormatter}
that implements value to string and string to value conversion via
an instance of {@link NumberFormat}.
Since: 1.4
Constructor Summary | |
---|---|
NumberFormatter()
Creates a NumberFormatter with the default NumberFormat from
NumberFormat.getNumberInstance(). | |
NumberFormatter(NumberFormat format)
Creates a NumberFormatter with the specified NumberFormat. |
Method Summary | |
---|---|
void | setFormat(Format format)
Sets the NumberFormat that this NumberFormatter will use to determine
legal values for editing and displaying.
|
Parameters: format the NumberFormat to use for this NumberFormatter.
Parameters: format the Format to use to determine legal values.