Java Reference
In-Depth Information
3. Modify the applet created in Programming Exercise 1 by adding a color
menu to change the color of the digit drawn.
4. Modify the applet created in Programming Exercise 1 by adding a JList of
eight items so the user can change the background color of the applet.
5. Create an applet that will draw a set of ovals similar to that shown in Figure
12-28. The user can specify the number of ovals.
FIGURE 12-28 Figure for Programming Exercise 5
6. Modify the applet in Programming Exercise 5 by adding three different types
of GUI components so the user can select from the following:
a. Number of figures: 1, 2, 4, 8, 16, or various combinations of these
numbers
b. Type of figures: circle, oval, rectangle, or square
c. Color: red, blue, green, yellow, pink, black, cyan, or magenta
7. Modify the applet in Programming Exercise 5 by adding the necessary
menus so the user can select from the following:
a. Number of figures: 1, 10, 20, 30, or 40
b. Type of figures: circle, oval, rectangle, or square
c. Color: red, blue, green, yellow, pink, black, cyan, or magenta
8. Convert the WhiteBoard program (presented earlier in this chapter) from an
application to an applet.
9. Redo JListPictureViewer (presented earlier in this chapter) using one of
the layout managers. For this exercise, use a JList and one JLabel to
display the image.
1
2
Search WWH ::




Custom Search