The BigDecimalField is the first edit field in the applet. All other fields (except scale) are standard AWT
components.The applet doesn't do anything productive. It just allows you to enter numbers into the BigDecimalField and observe
the events that the bean produces and to see how the bean reacts to various settings and entries.
- Choose different locales from the choice field near the bottom of the applet to see their effect
on formatting. These locales will show a variety of formats:
Note: In some cases
there may be only one (or no) languages listed in the "Choose a Locale" choice field and you
will not be able to use this demonstration.
||English (United States)
- Type a new number into the BigDecimal field. Be sure to use the formatting characters that are appropriate
for the locale setting. Press Enter or just move the focus to another field. A propertyChange
Event will appear in the event field.
- Try different settings for scale and rounding. Notice that changing the scale, rounding, or locale
does not fire a property change. An event is fired only when you enter a new number or
use the setValue(BigDecimal) method from an application.
- Enter a letter or an illegal format character for the locale such as a "*" into the BigDecimalField. You will
hear a beep (which can be disabled) and the character will be ignored. Multiple character errors such as
-1-23,, or reversal of the grouping and decimal separators will be caught when you press enter or shift the
focus to a new field. In that case a beep will be sounded and the last valid number will be displayed again.