The JavaTM Tutorial

| Start of Tutorial > Start of Trail > Start of Lesson | Search Feedback Form

Trail: Creating a GUI with JFC/Swing
Lesson: Converting to Swing

## Why to Convert

> The strongest reason to convert to Swing is because it offers many benefits to programmers and end users. Among them:
> - The rich set of ready-made components means that you can easily add some snazzy features to your programs -- image buttons, tool bars, tabbed panes, HTML display, images in menu items, color choosers, ... The list goes on and on.
> - You might be able to replace or reimplement some custom components with more reliable, extensible Swing components.
> - Having separate data and state models makes the Swing components highly customizable, and enables sharing data between components.
> - Swing's Pluggable Look & Feel architecture gives you a wide choice of look-and-feel options. Besides the usual platform-specific looks and feels, you can also use the Java Look & Feel, add an accessory look and feel (such as an audio "look and feel"), or use a third-party look and feel.
> - Swing components have built-in support for accessibility, which makes your programs automatically usable with assistive technologies.
> - The Swing components will continue to be enhanced in the future.

> It's reasonable to put off converting if you don't think your users will be able run Swing programs conveniently. For example, if your program is an applet and you want anyone on the Internet to be able to use it, then you have to consider how many Web surfers have browsers that can run Swing programs. As of this writing, the major browsers don't have Swing support built in; the user must add it by downloading and installing Java Plug-in .

> You have the choice of upgrading to Java 2 (JDK 1.2) when you convert to Swing. However, you don't need to decide right now whether to upgrade. Programs written with JDK 1.1 and Swing generally work just fine in Java 2. For information about new and improved features of Java 2, see Tables of JDK Features.

| Start of Tutorial > Start of Trail > Start of Lesson | Search Feedback Form