Difference between AWT and Swing compenents

Showing Answers 1 - 4 of 4 Answers

M.Manikumar

  • Aug 13th, 2005
 

The main difference between AWT and Swing components are the AWT components use native methods whereas Swing components use the methods that are writtern in Java.Hence AWT components are Heavy Weight components and Swing components are Light Weight components.

  Was this answer useful?  Yes

Vinay Kumar Samudrala

  • Sep 28th, 2005
 

I fully agree with the above comment. Not only that they have added many adaptor classes. For example to Close the Swing frame in the AWT you have to extends the WindowListener class and U have to overrride many methods. But in swings no need to close the Frame just you have to write the frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); like this type of methods they implemented in the Swing componenets.

 

regards

Vinay Kumar Samudrala

  Was this answer useful?  Yes

Radhey Krishna Yadav

  • Apr 18th, 2006
 

awt is not platform independent whereas swing is plateform independent because the resolution of awt is defferent 16-bit computer and 32-bit computer whereas in case of swing resolution is same on different-different bit computers.

Running for the awt need the appletviewer whereas swing run on the console not necessary the browser.

The Look and feel of the Swing is better than awt.

swing has not main() method whereas awt has main() method.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions