Professional Documents
Culture Documents
Week 8
A - Review Questions:
7. What is the difference between the Cartesian and the Java Coordinate systems?
8. How are events generated? What do events contain?
9. What are the event registration methods for:
A. Button click or enter in a text field
B. Mouse dragged
C. Mouse clicked
10. Explain the following code and simplify it using lambda expression.
btn.setOnAction(new EventHandler<ActionEvent>(){
public void handle(ActionEvent event) {
System.out.println("Hello World!");
}
});
1. Explain the code below. Without running the code, describe the output of this program.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
import javafx.scene.shape.Rectangle;
C – Additional Materials:
You can check out the online materials on JavaFX, especially regarding GUI elements that
you might need for your Assignment 2.
A step by step guide on how to use SceneBuilder and how to create a login application
and how to connect JavaFX to SQLite, and many more useful tutorials
https://www.lynda.com/Java-tutorials/JavaFX-GUI-Development/466182-2.html