• List at least three types of objects that can be contained in a Parent object
  • Design and implement a graphical user interface (GUI) programs using the Label and Button classes from the JavaFX package
  • Derive from the Application class and create a simple GUI application
  • Create a FlowPane and add multiple components to the pane

Note taking requirement

Don't forget to submit your notes in Canvas prior to classtime.

Reading

Introduction to JavaFX [8:01]

  • What is JavaFX?
  • How is the Application class used in a JavaFX application?
  • What method must be implemented when extending the Application class.
  • How is the Stage class used in a JavaFX application?
  • How do you end a JavaFX application?
  • How is the Scene class used in a JavaFX application?
  • How is the Label class used in a JavaFX application?

Stage Class [4:43]

  • This starts with the code from the Taylorial page shown in the last video running.
  • Note: The VM options shown in the comment are not required since we are using Java 8 this year.
  • How would you make your app be full screen?
  • How would you make your app always be on top of other windows?
  • How is the size of the window determined if no preferred size is set?
  • How are the Stage and Window classes related?

Scene and Group Classes [3:21]

  • What is the relationship between a Scene and a Group?
  • How do we add children to a Group object?

Connecting a Button [6:52]

  • What instance variable(s) were added to the class? Why?
  • What does Button.setOnAction() do?
  • this::enlargeCircle is a method reference. We will talk more about how this works after the break.

Event Handler Method [2:03]

  • Is EventHandler a class or an interface?
  • What does the generic type T represent in the EventHandler?
  • What method(s) does EventHandler have and what do they do?

FlowPane Class [5:41]

  • What is the relationship between a Scene and a FlowPane?
  • What types of objects can be added to a FlowPane object?
  • How does the FlowPane organize the items in it?
  • How does a TextField differ from a Label