Section 25.5.5 TipCalculatorController Class

• The RoundingMode enum of package java.math is used to specify how BigDecimal values are rounded during calculations or when formatting floating-point numbers as Strings.

• Class NumberFormat of package java.text provides numeric formatting capabilities, such as locale-specific currency and percentage formats.

• A Button’s event handler receives an ActionEvent, which indicates that the Button was clicked. Many JavaFX controls support ActionEvents.

• Package javafx.scene.control contains many JavaFX control classes.

• The @FXML annotation preceding an instance variable indicates that the variable’s name can be used in the FXML file that describes the app’s GUI. The variable names that you specify ...

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.