• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Difference between lightweight and heavyweight objects

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Can i know what is the industry definition for lightweight and heavyweight objects?

One about AWT is heavyweight and SWING is lightweight for usage of navie system resources is okai.

Is there anything in for just java objects to be said as lightweight or heavyweight ?

Things in my mind like :
1) Use of hierarchy of objects.
2) heavy in memory.
3) something like EJB is heavy ?

Cheers,
Amit
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Off of java.sun.com:

Heavy and light components
Most of the issues related to mixing AWT and Swing components are related to the mixing of so-called heavyweight and lightweight components. A heavyweight component is one that is associated with its own native screen resource (commonly known as a peer). A lightweight component is one that "borrows" the screen resource of an ancestor (which means it has no native resource of its own -- so it's "lighter").

(Lightweight component support was introduced in JDK1.1, and you can read more about it in the JDK1.1 Lightweight UI Framework design document.)


More on this topic can be found at http://java.sun.com/products/jfc/tsc/articles/mixing/
Hope this helps.
[ July 07, 2004: Message edited by: Emmy Rauch ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic