top button
Flag Notify
Site Registration

Can you compare SWING and AWT?

+1 vote

I want to know the difference?

posted Dec 9, 2014 by Dominic

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+3 votes
Best answer

AWT (Abstract Window Toolkit)

AWT is Java’s original set of classes for building GUIs

 1. AWT stands for Abstract windows toolkit.

 2. AWT components are called Heavyweight component.

 3. AWT components require java.awt package.


Swing is designed to solve AWT’s problems

 1. Swing is also called as JFC’s (Java Foundation classes).

 2. Swings are called light weight component because swing components sits on the top of AWT components and do the work.

 3. Swing components require javax.swing package.

Swing components operate same as AWT components, the only differences are that Swing provides a number of new event types.

Few Swing components don't have an AWT counterpart.

Swing is an extension of AWT. It is not the replacement for the AWT.

The advantages of Swing components is components are not rendered on the screen by the operating system, the look and feel of a component does not change when application is running on different platform using different versions.

It is possible to cause Swing components to mimic the look and feel of a specific platform no matter what platform the program is running on. This is known as pluggable look and feel.

answer Dec 10, 2014 by Karthick.c
Similar Questions
+1 vote

Do the big Linux distributions support java when freshly installed?
If i have a Java Swing application, will it work in a freshly installed Linux with no internet connection?

I understand that there are no guarantees, but how likely is it for a Linux machine NOT to have any java/Swing support?