|Table of Contents|
by Kathy Walrath
The Creating a User Interface trail covers everything you need to know about creating a user interface (UI) for a Java program.
Note: All the material covered in this trail applies to both applets and applications, except for a few clearly marked exceptions.
Overview of the Java UI tells you about the pieces the Java environment provides for building UIs. It introduces you to the graphical UI components and other UI-related classes provided in the Java environment. It also gives an overview of how programs display themselves and how they handle events such as mouse clicks. You should fully understand the information in this lesson before going on to other lessons in this trail.
Using Components, the GUI Building Blocks tells you how to use each of the standard UI components and how to implement a custom component. It also discusses details of the component architecture and solutions to common component problems.
Laying Out Components within a Container tells you how to choose a layout manager, how to use each of the layout manager classes the Java environment provides, how to use absolute positioning instead of a layout manager, and how to create your own layout manager. It also discusses solutions to common layout problems.
Working with Graphics tells you how to do everything from drawing lines and text to loading, displaying, and manipulating images. It includes information on performing animation and on improving graphics performance.
A Note about the Examples: Most of the example programs in this chapter are applets. This lets you easily run them just by visiting the relevant pages in the online tutorial. But don't let the fact that the examples are applets confuse you -- writing an application with a GUI is very similar to writing an applet with a GUI. See Component Problems (and Their Solutions) for information on the differences between applets and applications, and on converting an applet into an application.
|Table of Contents|