Faces
Create a frame with three buttons in the NORTH section of the frame. The buttons should be labeled with the names of three of your favorite TV or movie characters such as Moe, Larry, and Curly, or Bart, Homer, and Marge, or perhaps Sleepy, Dopey, and Grumpy.
Place a label in the CENTER section of the frame. It would be nice if, when you click a button, a picture of the corresponding character appears on the label. However, button-clicking is a topic for Chapter 19. For the present, the constructor should place a randomly chosen image of one of the three characters in the CENTER section of the frame. Because the image is randomly chosen, the same picture does not show each time the frame is instantiated. In the SOUTH section of the frame, include a quotation from the character or caption about the character. Include a main(...) method that instantiates your frame.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here