25.5.4 TipCalculator Class
When you created the Tip Calculator app’s project, NetBeans created two Java source-code files for you:
• TipCalculator.java—This file contains the TipCalculator class, in which the main method (discussed in this section) loads the FXML file to create the GUI and attaches the GUI to a Scene that’s displayed on the app’s Stage.
• TipCalculatorController.java—This file contains the TipCalculatorController class (discussed in Section 25.5.5), which is where you’ll specify the Slider and Button controls’ event handlers.
Figure 25.17 presents class TipCalculator. We reformatted the code to meet our conventions. With the exception of line 18, all of the code in this class was generated by NetBeans. As we discussed in Section ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access