java.awt and java.swing contain all of the classes for creating user
interfaces.
The methods of java.awt package are native methods. They are inherited from C or C++ package. C in platform dependent. the components created by these methods are also dependent on a platform. Example: the button in Windows OS in not same as the button create in the Unix operating system.
java.awt package is a heavy weight. It takes more resources to execute these methods.
java.swing uses less memory and it is platform independent.