You are here:   HomeJava ProgrammingSwing
by Dinesh Thakur Category: Swing

Java graphics programming is possible using AWT i.e. Abstract Window Toolkit and swing components. Swing is a set of classes. These classes provide the components that are more powerful and flexible than AWT.

The difference between AWT and Swing is as given below -

 

AWT

Swing

The Abstract Window ToolKit is a heavy weight component because every graphical unit will invoke the native methods.

The Swing is a light weight component because it's the responsibility of JVM to invoke the native methods

The look and feel of AWT depends upon platform.

As Swing is based on Model View Controller pattern, the look and feel of swing components in independent of hardware and the operating system.

AWT occupies more memory space.

Swing occupies less memory space.

AWT is less powerful than Swing.

Swing is extension to AWT and many drawbacks of AWT are removed in Swing.