Sams Teach Yourself Java™ in 24 Hours (Covering Java 7 and Android)

(singke) #1
ptg7068951

Summary 279

LISTING 19.3 The Full Text of LinkRotator.html
1: <applet
2: code=”LinkRotator.class”
3: codebase=”..\build\classes”
4: width=”300”
5: height=”100”
6: >
7:


When you’re done, right-click the name LinkRotator.htmlin the Project
pane and choose View. The page opens in a web browser, and the applet
displays each of the links in rotation. Click the Gobutton to visit a site.
Figure 19.2 shows what the applet looks like in Internet Explorer.


Summary


Threads are a powerful concept implemented with a small number of
classes and interfaces in Java. By supporting multithreading in your pro-
grams, you make them more responsive and can speed up how quickly
they perform tasks.


Even if you learned nothing else from this hour, you now have a new term
to describe your frenzied lifestyle. Use it in a few sentences to see if it
grabs you:


. “Boy, I was really multithreading yesterday after we held up that
string of liquor stores.”
. “I multithreaded all through lunch, and it gave me gas.”
. “Not tonight, dear, I’m multithreading.”


FIGURE 19.2
Displayingrevolving links in an
applet window.
Free download pdf