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

Difference between revisions of "FAQ Is SWT better than Swing?"

 
m
Line 1: Line 1:
''
 
 
 
 
 
This is equivalent to asking whether a hammer is better than a
 
This is equivalent to asking whether a hammer is better than a
 
screwdriver. The answer, of course, depends on whether
 
screwdriver. The answer, of course, depends on whether
 
you are holding a nail or a screw.   
 
you are holding a nail or a screw.   
 
 
  
 
SWT and Swing are different tools that
 
SWT and Swing are different tools that
Line 16: Line 10:
 
for a highly customizable look and feel that is common across all
 
for a highly customizable look and feel that is common across all
 
platforms.  
 
platforms.  
 
 
  
 
The answer to which is better for your application depends on
 
The answer to which is better for your application depends on
Line 24: Line 16:
 
one that looks and behaves like other applications on each of
 
one that looks and behaves like other applications on each of
 
the platforms it is running on?   
 
the platforms it is running on?   
 
 
  
 
Of course, a hammer wielded with sufficient force can probably drive  
 
Of course, a hammer wielded with sufficient force can probably drive  
Line 32: Line 22:
 
hammers and screwdrivers in her tool box and will use the tool that  
 
hammers and screwdrivers in her tool box and will use the tool that  
 
is appropriate for the job at hand.
 
is appropriate for the job at hand.
 
 
 
  
 
== See Also: ==
 
== See Also: ==
 +
[[FAQ How do I embed AWT and Swing inside SWT?]]
  
 
+
{{Template:FAQ_Tagline}}
[[FAQ_How_do_I_embed_AWT_and_Swing_inside_SWT%3F]]
+
 
+
<hr><font size=-2>This FAQ was originally published in [http://www.eclipsefaq.org Official Eclipse 3.0 FAQs]. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0].</font>
+

Revision as of 01:09, 16 June 2006

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