O'Reilly logo

Platinum Edition Using XHTML™, XML, and Java™ 2 by Andrew H. Watt, Mike Morgan, Jim O'Donnell, Eric Ladd

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sample Applets

Sometimes programming is better "caught than taught." This section shows three fairly advanced applets—each uses techniques that haven't been described in detail in this book. If you have a programming background, most of the logic of these applets should be clear; look in the Java documentation for details about the API. If you want a more detailed treatment of Java programming, read Special Edition Using Java 2, Standard Edition (Que, 2000).

SystemInfo

The applet in Listing 36.5 demonstrates how to build several "cards" of data into an applet. The file defines three classes:

  • LabelField— A derivative of Panel that knows how to lay out its data and a label.

  • SystemInfo— The applet class itself, which reads various system properties ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required