Homework - AWT and Applets

  1. Write an applet that draws 15 random filled shapes either circles or squares. Draw each shape using a 15 by 15 bounding box. Choose a random position for each shape. Randomly choose one of the colors black, blue, red, yellow, green, or magenta for each shape. Write your name in the lower right corner.

  2. Create an applet like the following. You can use the selectAll() method of TextField (inherited from TextComponent) to select the text that the user enters. Use exceptions to validate the user's input.



Email Me | Office Hours | My Home Page | Department Home | MCC Home Page