sarathi
Answered On : Oct 24th, 2007
Beausethe componentare created by the java itself not by theoperating system.
Login to rate this answer.
the components are created by the own package not by operating system
Login to rate this answer.
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
Login to rate this answer.
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.
Login to rate this answer.