You are on page 1of 1

Lab #5

1. Write a program that displays the following labels and images using a flow pane. The image
files can be downloaded below. Use the following code to set the font of the labels:
label.setFont(Font.font("Times New Roman", FontWeight.BOLD, FontPosture.ITALIC, 20));

2. Write a program that paints a smiley face as shown below.

Modify the image to add a rectangle (or square somewhere) in the image. Also apply color to all
the shapes. You are free to embellish the face as much as you like provided you have used at
least 5 different shapes.

This question was supplied by Dr. George Townsend, modified by Michael Lajoie Spring 2021

You might also like