What is the difference between light weight component(like swing) and heavy weight component(like awt).

Showing Answers 1 - 9 of 9 Answers

chandana

  • Apr 3rd, 2006
 

The main difference is AWT is  a package which is used for running all  the applications such as Applets, Swings, Beans.

Where as A Swing  is an class  which can be used only  for deploying or writing the swing applications.

  Was this answer useful?  Yes

Royal

  • Apr 5th, 2006
 

So there is the difference between package and class?

i think package is the collection of classes.

  Was this answer useful?  Yes

Rajesh Jangid

  • Apr 8th, 2006
 

Swing just wrapes around the existing windows API whereas AWT is the whole windows functionality impememted.

  Was this answer useful?  Yes

samatha

  • Apr 18th, 2006
 

The main difference lightweight components are o.s independent,heavy weight components are o.s dependent

  Was this answer useful?  Yes

Jayakrishnan K.R.

  • Apr 19th, 2006
 

Hey ,

Lightweight means all the APIs are in PURE JAVA and for HeavyWeight it is not so..

  Was this answer useful?  Yes

Yunus

  • Apr 24th, 2006
 

The basic difference between Swing and AWT is that Swing APIs are purely java libraries i.e. they don't at all depend on the native libraries to draw graphical components. Because of this feature they provide a consistent look and feel on all platforms. AWT libraries require the support of native graphics libraries and some of their GUIs components look different on different platforms.Moreover, Swing components are not inherently Thread safe, you explicitly have to write synchronized code to manipulate or redraw them whereas AWT components can be trusted in a multithreaded environment.AWT Components are called heavyweight components because of their dependency on native libraries. Swing components are called lightweight due to their independence of native libraries. Hence Swing operations are much faster because each and every operation is taken care by the java runtime env and no delegation of events or commands to the native libraries is required.

  Was this answer useful?  Yes

Srinivas

  • May 21st, 2006
 

Hi Friends,

In java the componenets are light weightcomponents and heavy weight components .light weight componenets are the componenets which are used less resources and light weight components have heigh performance.heavy weight componenets are the componenets which are uses more resources than light weight components and heavy weight components have low performance.

ok bye..........

Keeps Smiling And Mailing

bora_srinivasarao@yahoo.co.in

NOTE: If Any one have doubts Then send a mail to My mail id.and if any one want e-books,java faq's and material send a mail to my id.

  Was this answer useful?  Yes

Hi Friends,

In java the componenets are light weightcomponents and heavy weight components .light weight componenets are the componenets which are used less resources and light weight components have heigh performance.heavy weight componenets are the componenets which are uses more resources than light weight components and heavy weight components have low performance.

keeps smiling and mailing

bora_srinivasarao@yahoo.co.in

"HELP EVER HURT NEVER"&"IMPOSSIBLE AS POSSIBLE"

Note:If any one want java materials like e-books,faq's send a mail to my id.if any doubts regarding java send a mail to my id, if possible i will send answers.if any one want how to install java softwares ,tomcat,weblogic,eclipse,jbuilder etc and how to use plz send amil or ask online also i will definitly tell.

  Was this answer useful?  Yes

Hi Friends,

In java the componenets are light weightcomponents and heavy weight components .light weight componenets are the componenets which are used less resources and light weight components have heigh performance.heavy weight componenets are the componenets which are uses more resources than light weight components and heavy weight components have low performance.Awt components are heavy weight components .it uses internally c native code.

keeps smiling and mailing

bora_srinivasarao@yahoo.co.in

"HELP EVER HURT NEVER"&"IMPOSSIBLE AS POSSIBLE"

Note:If any one want java materials like e-books,faq's send a mail to my id.if any doubts regarding java send a mail to my id, if possible i will send answers.if any one want how to install java softwares ,tomcat,weblogic,eclipse,jbuilder etc and how to use plz send amil or ask online also i will definitly tell.

for java click on it: http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/DEA2eIX.html

for myhome page: http://in.geocities.com/bora_srinivasarao/MyHomepage.html

  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