ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Java J2EE  >>  Java Related  >>  Swing
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
Difference between ligt weight and heavy weight?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Difference between ligt weight and heavy weight?
Answer
# 1
1. Heavy weight components are always Rectangle in shape
while light weight may or may not.

2. Heavy weight components borrows the native screen to
paint their components while light weight render their
components by their own screen painting APIs.

3. They differ from z-indexing to each other, heavy weight
components are always displayed at the top of all
lightweight components.

4. Light weight components are faster in response and
performance.
 
Is This Answer Correct ?    6 Yes 1 No
Vishwas Saxena
 
  Re: Difference between ligt weight and heavy weight?
Answer
# 2
2, light weight components borrows the native screen to
paint their components while Heavy weight render their
components by their own screen painting APIs.
 
Is This Answer Correct ?    0 Yes 4 No
Aileen
 
 
 
  Re: Difference between ligt weight and heavy weight?
Answer
# 3
[Short answer: threads are lightweight, programs (aka
processes or tasks) are heavyweight. -Alex]

Lightweight and heavyweight processes refer the mechanics of
a multi-processing system.

In a lightweight process, threads are used to divvy up the
workload. Here you would see one process executing in the OS
(for this application or service.) This process would posess
1 or more threads. Each of the threads in this process
shares the same address space. Because threads share their
address space, communication between the threads is simple
and efficient. Each thread could be compared to a process in
a heavyweight scenario.

In a heavyweight process, new processes are created to
perform the work in parallel. Here (for the same application
or service), you would see multiple processes running. Each
heavyweight process contains its own address space.
Communication between these processes would involve
additional communications mechanisms such as sockets or pipes.

The benefits of a lightweight process come from the
conservation of resources. Since threads use the same code
section, data section and OS resources, less overall
resources are used. The drawback is now you have to ensure
your system is thread-safe. You have to make sure the
threads don't step on each other. Fortunately, Java provides
the necessary tools to allow you to do this.
 
Is This Answer Correct ?    2 Yes 0 No
Modi[achir Communication]
 

 
 
 
Other Swing Interview Questions
 
  Question Asked @ Answers
 
Default layout for a ContentPane in JFC? HCL4
What is meant by Swing?  4
What is the default look and feel of a Swing Component?  2
when we right click on the JTable using mouse it works properly but how to right click on JTable in java using keyboard what should be the code for the same.....? Thanks Nitin  1
when i run Frame program, it display output in supparate window.i try to close using "X" it not close.min'-' & max'+' are working.pls what is problem? i run in editplus. folowing program i given. import java.awt.*; class Form1 { Frame f1=new Frame("loginpage"); Label l1=new Label("username"); Label l2=new Label("password"); TextField tf1=new TextField(); TextField tf2=new TextField(); Button b1=new Button("submit"); Form1() { f1.setLayout(new FlowLayout()); f1.add(l1); f1.add(tf1); f1.add(l2); f1.add(tf2); f1.add(b1); f1.setSize(437,440); f1.setVisible(true); //f1.dispose(); } public static void main(String[] args) { Form1 f=new Form1(); } }  4
What is the use of JTree?  2
Does Swing contains any heavy weight component?  4
what do u mean by GUI framework  1
can we create a object in static block class A { static { A a=new A(); } }  5
Name the borders provided by Swing? Accenture1
how can u handle runtime exceptions in java plz explain with examples briefly? Fujitsu2
What is meant by JFC? Mindlogicx5
When i m clicking on next another frame is open but i want to hide the previous frame...........but it is not happening....still both frame are visible........how to make one frame to hide.......please help me.......  2
What is the difference between AWT and Swing ? TCS1
Name the method, to expand & collapse nodes in a Jtree? Wipro1
Explain the differences between an applet and a Japplet? Satyam1
What are the features of JFC?  1
how to give transparency for JComboBox,JListBox and JTable TCS1
What are the benefits of using Swing over AWT?  1
how to give transparency to JComboBox,JList and JTable Ness-Technologies3
 
For more Swing Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com