As you may have guessed, the object that represents the application is an instance of the ClickMeApp class, the object that represents the custom component is an instance of ClickMe, and the spot is represented by an instance of Spot. Because the object that represents the spot on the screen is very simple, let's look at its code. The Spot class declares three instance variables: size contains the spot's radius, x contains the spot's current horizontal location, and y contains the spot's current vertical location. It also declares two methods and a constructor — a subroutine used to initialize new objects created from the class. |