|Start of Tutorial||
Also known as The Swing TutorialThis trail tells you how to create graphical user interfaces (GUIs) for applications and applets, using the Swing components.
Your feedback is important to us! Please send your comments and suggestions to us using the feedback page. This trail has been updated to the 1.4 release of the Java 2 platform and is available in a new book.
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.
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.
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 TrailsAlthough this is the main trail for learning about GUIs, it isn't the only trail with UI-related information.
- 2D Graphics, which describes the 2D graphics features available in the Java 2 platform.
- Sound, which discusses the sound capabilities available in the Java 2 platform.
- Writing Applets, which describes API available only to applets, such as sound capabilities in JDK 1.0 and 1.1.
- Essential Java Classes, which covers many topics, including properties and the standard I/O streams.
- The Bonus trail contains Full-Screen Exclusive Mode API, a lesson that describes how to use API introduced in v1.4 to render graphics directly to the screen.
Note: This trail does not tell you how to use the AWT components. Information on them is in the old UI trail, which is available for downloading as Creating a User Interface (AWT Only).
As of January, 2004, four lessons have been removed or totally rewritten. To find these sections, one of which includes hints on converting from AWT code to Swing code (but hasn't been updated in ages) and another of which has tips on using the original
Graphicspainting API, download the Swing trail as of May, 2003.
|Start of Tutorial||
Copyright 1995-2005 Sun Microsystems, Inc. All rights reserved.