Previous | Next | Trail Map | Creating a GUI with JFC/Swing | Contents

Swing Features and Concepts

This lesson introduces Swing's features and explains all the concepts you need to be able to use Swing components effectively. At the end of this lesson we dissect a Swing program, as a means of reviewing everything you've learned.

Swing Components and the Containment Hierarchy

This section shows you all the Swing components and tells you how, in general, to combine them to create a GUI. Swing provides many standard GUI components such as buttons, lists, menus, and text areas. It also includes containers such as windows and tool bars.

Layout Management

Containers use layout managers to determine the size and position of the components they contain. Borders affect the layout of Swing GUIs by making Swing components larger. You can also use invisible components to affect layouts.

Event Handling

Event handling is how programs respond to external events, such as the user pressing a mouse button. Swing programs perform all their drawing and event handling in the event-dispatching thread.

Drawing

Drawing means painting the component on-screen. Although it's easy to customize a component's drawing, most programs don't do so.

More Swing Features and Concepts

Pluggable look and feel, separate models, accessibility support, threads, miscellaneous stuff provided by JComponent...

The Anatomy of a Swing Program

This section picks apart a Swing application, named Converter, to review how Swing programs work.


Previous | Next | Trail Map | Creating a GUI with JFC/Swing | Contents