Objective: The goal of this lab is to practice creating graphical user interfaces with JavaFX.
A) Write a program that paints a smiley face. Amount of detail and shapes and color choices are up to you, but at the very least your face must have four identifiable features (e.g., two eyes, a nose, and a mouth) and an encompassing face (outline, of some sort). Feel free to be creative! (If confused, perhaps think how you'd design a jack-o-lantern face ;)
B) Write a program that enables the user to specify the location and size of two rectangles, draw the rectangles, and display whether the two rectangles intersect. I've written starter code for you for this problem (particularly to give you some of the layout), but feel free to start from scratch if youd like to figure it out yourself. (If you use the starter code, look for TODOs in comments.)
Once finished, running your application should look roughly like this: see image.
After entering in some rectangle info: see image.
Hints:
a) To center an element, like say, a button, you can add it to a StackPane, then add that StackPane to the desired layout/location. For example,
otherPane.getChildren().add(new StackPane(new Label("Centered text")));
b) To parse a double value from a String, you can use Double.valueOf("double string");
c) To determine if two rectangles intersect, consider that it may be easier to determine if they don't intersect (then if they dont not intersect, they intersect ;).