CS 160 Lab 10
Today's lab:
- Everyone should finish this lab today.
- You are to write an applet that changes background color if the mouse is clicked inside a particular Rectangle that you draw.
- You built an applet in lab 6 so you should know how to do Applets.
- I did a similar exercise yesterday in class but with a frame instead of an applet.
- Now you combine the two to create the background color changing applet.
- After you get the mouseClick to work on anywhere in the applet, then draw a rectangle and make the mouse click be inside the box.
If you want more advanced stuff:
- Make the box animate if clicked.
- Have the box moving and it only works if your click hits the moving box.
- Keep score. It's your first shooting gallery type game.
Good Luck