Discussion Locked

Light weight class

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
what is the difference between a Light weight class and a normal class?

3 replies

by sun_dev

Hi Pjrs,
In java you got two divisions one is Heavy weight and another is Light weight.
Heavy weight (HW) is the one which will get the component characteristics from its peer operating system.i.e.,if you are creating button in windows it will get the characters (Visual) like color,shape from windows operating system.If you are executing the same problem from Mac you will see the different shape and color of button.This HW is taken care by the AWT (Abstract Window Toolkit) in java .
Light Weight (LW) is the one where the characters of components is defined by the program not the operating system.So you can bring the button shape of Mac in Window or vice versa.This part of Light Weight is taken care by the SWING in java.
I Hopeyou can understand by the explanation above..

This discussion is closed to new replies.