Below is the code from NumberFieldsSample.java that sets up the non-localized real number fields:
Try this:
- using Java Web Start.
- Type into the fields. Only values of the accordant type are accepted.
The base class of the whole-number fields is the JWholeNumberField, which is backed up by the BigInteger class. Thus this field can be used for arbitrary big whole-numbers.
For each whole-number primitive type there is a number field based on JWholeNumberField:
The base class of the real number fields is the JRealNumberField, which is backed up by the BigDecimal class. Thus this field can be used for arbitrary big real numbers.
For each real number primitive type there is a number field based on JRealNumberField:
The base class of the localized real number fields is the JLocalizedRealNumberField, which is backed up by the BigDecimal class. Thus this field can be used for arbitrary big real numbers.
For each real number primitive type there is a number field based on JLocalizedRealNumberField: