Trail: Creating a GUI with JFC/Swing

Also known as The Swing Tutorial

We are in the process of updating this section to reflect features and conventions of the latest release, JDK 6.0. The subsections indicate what areas have been updated.
This trail tells you how to create graphical user interfaces (GUIs) for applications and applets, using the Swing components.

Getting Started with Swing is a quick start lesson. First it gives you a bit of background about the JFC and Swing. Then it tells you how to compile and run programs that use Swing components. Next, it shows you how to run programs using Java Web Start.

Learning Swing by Example explains the concepts you need to use Swing components in building a user interface. It is built around several progressively complicated examples, so you'll learn the basics by examining code samples.

Using Swing Components tells you how to use each of the Swing components — buttons, tables, text components, and all the rest.

Concurrency in Swing discusses concurrency as it applies to Swing programming. Information on the event dispatch thread and the SwingWorker class are included.

Using Other Swing Features tells you how to use actions, borders, icons, and timers. It also helps you to create multithreaded programs.

Laying Out Components Within a Container tells you how to choose a layout manager, how to use each of the layout manager classes the JavaTM platform provides, how to use absolute positioning instead of a layout manager, and how to create your own layout manager.

Modifying the Look and Feel tells you how to specify the look and feel of Swing components.

Drag and Drop and Data Transfer tells you what you need to know to implement data transfer in your application.

Writing Event Listeners tells you how to handle events in your programs.

Performing Custom Painting gives you information on painting your own Swing components. It discusses painting issues specific to Swing components, provides an overview of painting concepts, and has examples of custom components that paint themselves.

Other UI-Related Trails

Although this is the main trail for learning about GUIs, it isn't the only trail with UI-related information.
Previous page: Beginning of Tutorial
Next page: Getting Started with Swing