- Describe the differences between creating JavaFX applications using imperative programming and using FXML with declarative style programming
- Implement controller classes and make appropriate modifications to FXML files to provide functionality to UI controls such as Button and TextField classes
Note taking requirement
Don't forget to submit your notes in Canvas prior to classtime.
Reading
- Study sections 18.1-18.4
Intro [9:50]
- What does MVC stand for?
- Which file contains the View?
- Which file contains the Controller?
- What do we need to do with a
FXMLLoader
object to use FXML?
- Watch the following video [link]
FXML [14:09]
- What does FXML stand for?
- What was the root component used in Prof. Jones' FMXL file?
- How is the controller associated with the FXML file?
- Where are attributes placed in FXML files?
- What does the
xmlns:fx
attribute specify? - How was the
padding
tag used?
- Watch the following video [link]
Controller [10:29]
- Note that FMXL components referenced in the controller should be declared
private
- How are components declared in the FXML file tied to attributes in the controller class?
- When and why do we use the
@FXML
annotation? - How are event handlers specified in the controller class connected to components in the FXML file?
- Which components should be represented in the controller class?
- Watch the following video [10:29] [link]