The JavaTM Tutorial
Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail Search
Examples Index

Trail: Creating a GUI with JFC/Swing

Lesson: Getting Started with Swing

This lesson gives you a quick introduction to using the JFC Swing packages to create a program's GUI. First, it tells you what the JFC and Swing are. Next, it helps you get the necessary releases and use them to compile and run a Swing program. Then it shows you how to run applets. Finally, it takes you on a whirlwind tour of a simple Swing application.

If you're more interested in learning concepts than in running programs right now, feel free to skip part or all of this lesson and to go to the next lesson, Swing Features and Concepts(in the Creating a User Interface trail). Then return here when you're ready to start programming.

About the JFC and Swing

This section gives you a little history about the JFC and Swing. If you've developed programs using AWT components, you'll probably be interested in the description of the differences between AWT and Swing components.

Compiling and Running Swing Programs

To write programs using the Swing components, you must first download the appropriate JDK and JFC releases. Then you can follow this section's instructions to compile and run the small Swing application provided.

Running Swing Applets

To write Swing applets, you must first be able to run them. This section provides two applets, with instructions for running them.

A Quick Tour of a Swing Application's Code

This section takes you through the code for a small Swing application. You'll see the code that a Swing application absolutely must have, and you'll learn about some commonly used Swing features.


Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search