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

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.