What Are The Heavyweight & Lightweight Components In Java?& Their Differences!

1

1 Answers

Rinav Gangar Profile
Rinav Gangar answered
  • Well Lightweight component in java is SWING and heavyweight components are AWT components
  • Heavyweight components are dependent on the underlying OS for their appearance and properties.
  • HeavyWeight-AWT components are not portable, what I mean Is if you design an app on Linux Box (say SuSe) compile it and run it on Solaris or Mac good old XP Box, your App will look different on each architecture; as they are dependent on OS graphical components.
  • As opposite to it are Lightweight component. They are portable. You design your app in SuSe Linux and run it on XP, they look all the same. The positive point is that your app will always look the same, and the way you always intended to be; when you designed it.
  • HW i.e. AWT are more resource hungry components then LW Swing.

well hope it helps.

Answer Question

Anonymous