Write a program that has only one button in the frame. Clicking on the button cycles through the colors: red --> green --> blue --> gray --> red --> and so on, one color change per click. In addition to the setBackground( Color.color ) method we have been using, you will need the Color getBackground() method to get the current color.
Another way to do this (a somewhat cruder way) is to use an instance variable (of type Color) in the frame to hold the current color.