CSC 112
Ileana Streinu

6. Background Colors

  1. Modify the applet to allow for 5 background colors and 5 text colors.
  2. Modify the applet to include a new button for modifying the font size used for the "Hello" text. Allow the font size to decrease from 18 to 10 in steps of 2 as the button is clicked. At 10, a new click should bring the value up to 18 again.
  3. Notice that each font is a new object from the class Font. Discuss with your lab partner how many Font objects you need to create. Think of alternate solutions, and describe them (briefly, in english) on the html page of your applet implementation. If you figure out a working solution in Java where only one Font object is created (and perhaps modified somehow later), you get Extra credit for this exercise.

    Hint: you may have to use the on-line Java documentation for the Font class to figure out an alternative solution.