August 28, 2010 at 12:16 PM
1) AWT stands for Abstract windows toolkit whereas Swing is called as JFC?s (Java Foundation classes).
2) AWT components use native methods Swing components use the methods that are written in Java. Therefore AWT is heavy weight component and swing is light weight component.
3) Light weight components have transparent pixels where as
heavy weight is always opaque.
4) Light weight components are non-rectangular whereas Heavy weight
components are rectangular
5) Swings components are made in pure java and they are
platform independent whereas AWT components are platform
6) Swing provides look and feel feature whereas this feature is not supported by AWT.
Difference between frame and panel:
1)A frame is a resizable movalble window with title bar and
close button. It contains Panels. Whereas a panel is a region internal to a Frame or another Panel.
2)A Frame is an independent object which can exist on its
own. It can contain one or more Panel object within it.
Whereas a Panel can not exist on its own. It need a parent
object like Frame/Window to be displayed/existence.