Java Reference
In-Depth Information
10. Create an applet to draw lines. The user can choose the start and end points
of the line to be drawn by clicking the mouse.
11. Create an application to illustrate mouse events, mouse motion events, and
keyboard events. Figure 12-29 shows the user interface. The key code
corresponding to a key event or the position of the mouse is displayed just
above the text field.
FIGURE 12-29 Figure for Programming Exercise 11
12. Create an applet to draw lines, rectangles, squares, circles, and ovals. The
user can select any one of these through a menu. The user can also choose
the start and end points of the line to be drawn by clicking the mouse. For
other geometric figures, the user chooses the upper-left and lower-right
corners by clicking the mouse.
13. Convert the Java Kiosk programming example from an application to an
applet.
14. Create an applet that starts with displaying several colored circles that can be
moved to different places in the applet by dragging the mouse.
15. Convert the GrandWelcomeFinal program (presented earlier in this
chapter) from an applet to an application.
16. Convert the OneChar program (presented earlier in this chapter) from an
applet to an application.
 
Search WWH ::




Custom Search