Results 1 to 4 of 4

Thread: What are the components are cosidered as Lightweight an Heavyweight in JAVA

  1. #1
    Join Date
    Oct 2008
    Posts
    86

    What are the components are cosidered as Lightweight an Heavyweight in JAVA

    What are the components in the java technology are considered as lightweight and heavyweight, and what if we used lightweight components instead of heavyweight component..and what does the role they play in programming..

  2. #2
    Join Date
    Jan 2006
    Posts
    6,878

    Re: What are the components are cosidered as Lightweight an Heavyweight in JAVA

    Lightweight components are the one which doesn’t go with the native call to obtain the graphical units. They share their parent component graphical units to render them. Example, Swing components, While in practice this sounds great, there are problems because not all native controls respond similarly to the same events. This can result in a Java program exhibiting different behavior under different Java AWT environments. What is a heavyweight component? - For every paint call, there will be a native call to get the graphical units. Example, AWT.

  3. #3
    Join Date
    Feb 2008
    Posts
    137

    Re: What are the components are cosidered as Lightweight an Heavyweight in JAVA

    A lightweight component is one that subclasses java.awt.Component (or java.awt.Container) directly - implementing the look-and-feel of the component in Java rather than delegating the look-and-feel to a native peer. Lightweight components sometimes flash noticeably unless you put them in a container that performs double buffering. Lightweight components will not appear if their container implements a paint method that doesn't call super.paint. In other words, if you implement a container that performs some drawing.

  4. #4
    Join Date
    Feb 2006
    Posts
    167

    Re: What are the components are cosidered as Lightweight an Heavyweight in JAVA

    One or more constructors. If the component responds to any events, such as mouse clicks, the constructor(s) should invoke the enableEvents method. Light weight Component is Swing, for ex: In swings If you want to create button the JVM is wont Ask that button to OS instead of it ill create its own button type. Light weight Component takes the components from the jvm, means it does not request the operating System for getting the components.

Similar Threads

  1. Layout manager for Swing Components in JAVA
    By afidelino in forum Software Development
    Replies: 3
    Last Post: 30-01-2011, 04:28 AM
  2. Java SWING Components - Table Models
    By Isiah in forum Software Development
    Replies: 5
    Last Post: 21-07-2010, 01:34 AM
  3. How to develop MTS components with Java
    By Farrah in forum Software Development
    Replies: 4
    Last Post: 02-02-2010, 04:01 AM
  4. How to put space between components in java?
    By Visala28 in forum Software Development
    Replies: 5
    Last Post: 29-01-2010, 02:45 AM
  5. Need advice for GUI module using Java components
    By Macadrian in forum Software Development
    Replies: 3
    Last Post: 24-11-2009, 10:47 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,961,601.78845 seconds with 16 queries