GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  Programming  >  Java Swing
Go To First  |  Previous Question  |  Next Question 
 Java Swing  |  Question 71 of 72    Print  
Why swing is called as light weighted component?

  
Total Answers and Comments: 4 Last Update: September 06, 2008     Asked by: Srinivasa Moorthi V 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 24, 2007 00:25:45   #1  
sarathi        

RE: Why swing is called as light weighted component?
Beause the component are created by the java itself not by the operating system.
 
Is this answer useful? Yes | No
December 06, 2007 22:49:49   #2  
sarathi trichy Member Since: October 2007   Contribution: 106    

RE: Why swing is called as light weighted component?
the components are created by the own package not by operating system
 
Is this answer useful? Yes | No
August 25, 2008 23:36:53   #3  
Kinjal Das Member Since: August 2008   Contribution: 1    

RE: Why swing is called as light weighted component?
Let try to understand what is heavywheight component. If We see AWT Components (Earlier Java versions) while painting the components a very thick 3D frame is drawn. Hence the name of Heavy weight.

And the reason why that heavy look is to come is because AWT being a very thin layer used to delegate all the painting work to the underlying Operating System native methods(Non java methods). Swings on the other hand uses the Graphics Object (Provided by Java itself) to draw the diagrams. Hence that heavy doesn't come up.

I guess that answer the question

 
Is this answer useful? Yes | No
September 05, 2008 15:44:19   #4  
shilpad Member Since: January 2008   Contribution: 3    

RE: Why swing is called as light weighted component?
A heavyweight component is one that is associated with its own native screen resource (commonly known as a peer). A lightweight component(swing) is one that "borrows" the screen resource of an ancestor (which means it has no native resource of its own -- so it's "lighter").
That is why swing is called light weight component.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape