Swing - SPLessons
SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

Swing Tutorials

Swing Tutorials

shape Introduction

Swing Tutorials, The extension of AWT is SWING. Here the AWT was introduced by Sun Micro Systems and the components of AWT was not satisfied by client requirements, then Netscape Communications Corporation introduced some extra classes as IFS(Internet Foundation Classes), IFS also not satisfied by client requirements. Sun Micro Systems and Netscape Communications Corporation both combined together and introduced a new product that is JFC (Java Foundation Classes)in 1997 with JDK 1.2. Later on JFC name was changed as SWING.

Features of Swing over AWT

shape Description

  • AWT is an OS dependent, i.e. The components of AWT are varied from one system to another, because components uses internally OS resources, the look and feel of the components are different. Where as Swing is OS dependent, the look and feel of components are same.
  • AWT is heavy weight because components use internally OS resources, whereas Swing is lightweight because it does not depend on any OS.
  • In AWT to close the frame developer uses windowListener and windowAdapter. Here swing uses only setDefaultCloseOperation () to close the frame.
  • The Swing will have more components compared to AWT.
  • Swing components will be available in Java swing. Where as AWT components will be available in Java. awt.
  • Swing component are independent of native Operating System's API as Swing API controls are rendered mostly using pure JAVA code instead of underlying operating system calls.
  • Swing provides Debugging support.

Swing API Hierarchy


shape Description

Before dealing with the Swing tutorial developer should have knowledge with AWT components because of all the components of AWT will be repeated in Swing also with high features.


shape Key Points

  • Swing Tutorials - Swing follows MVC.
  • Swing Tutorials - Swing underpins more capable components, for instance tables, color chooser.
  • Swing Tutorials - The look and feel of Swing is more effective compared to AWT.