Difference between AWT and Swing

Here you will learn about the difference between AWT and Swing.

AWT Swing
It uses java.awt package. It uses java.swing package.
It is a heavyweight component thus consumes large memory. It is a lightweight component thus consumes less memory.
It is used with an applet or windows based environment. It can be used in any environment.
AWT is a platform-dependent component. Swing is a platform-independent component.
AWT component is called the abstract windowing tool. Swing component called java foundation class.

Comment below if you have queries related to the above article, the difference between AWT and Swing.