Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

FAQ Is SWT better than Swing?

Revision as of 06:50, 29 October 2010 by Asc.bsiag.com (Talk | contribs) (Link Swing to Wikipedia)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is equivalent to asking whether a hammer is better than a screwdriver. The answer, of course, depends on whether you are holding a nail or a screw.

SWT and Swing are different tools that were built with different goals in mind. The purpose of SWT is to provide a common API for accessing native widgets across a spectrum of platforms. The primary design goals are high performance, native look and feel, and deep platform integration. Swing, on the other hand, is designed to allow for a highly customizable look and feel that is common across all platforms.

The answer to which is better for your application depends on which of these trade-offs you and your customers prefer. Do you want an application that looks the same on all platforms or one that looks and behaves like other applications on each of the platforms it is running on?

Of course, a hammer wielded with sufficient force can probably drive a screw into a wall, and the butt of a screwdriver can be used in a pinch to knock in a nail. However, a good carpenter keeps both hammers and screwdrivers in her tool box and will use the tool that is appropriate for the job at hand.

See Also:

FAQ How do I embed AWT and Swing inside SWT?


This FAQ was originally published in Official Eclipse 3.0 FAQs. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the Eclipse Public License v1.0.

Back to the top