December 1999
Intermediate to advanced
816 pages
20h 27m
English
Applets, as Panels, conform to what was discussed about GUI programming in Chapter 8. This means you can add components to an applet, set the layout manager, add event listeners, and process user interaction. Yet, there are some things that applets are particularly good at, such as displaying images. The remainder of the chapter is devoted to showing how to code applets.
Listing 9.2 illustrates code to show a minimal applet with some GUI components on it. Figure 9.1 shows the applet running in AppletViewer.
<HTML> <TITLE> Basic Applet Example for Pure Java </TITLE> <BODY> <Applet code=BookSearchApplet.class height=100 width=200> ... |
Read now
Unlock full access