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).


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 ...

Get Platinum Edition Using XHTML™, XML, and Java™ 2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.