Does Swing contains any heavy weight component?

Answers were Sorted based on User's Feedback



Does Swing contains any heavy weight component?..

Answer / varahala raju penmetsa

not components , in swings all top level Containers are
Heavy weight , JFrame,JWindow,JDialog,JApplet they do not
inherit from JComponent but they do from Component in AWT
thats y they are heavy weight .

cheers,

Is This Answer Correct ?    5 Yes 0 No

Does Swing contains any heavy weight component?..

Answer / jay

Yes. JFrame is Heavy Weight

Is This Answer Correct ?    4 Yes 0 No

Does Swing contains any heavy weight component?..

Answer / kalpit

With Swing only the top-level components are heavyweight:
JApplet,JFrame, JDialog, and JWindow.

Is This Answer Correct ?    4 Yes 2 No

Does Swing contains any heavy weight component?..

Answer / naresh tuhania

In swing all top-level components are heavyweight

Is This Answer Correct ?    2 Yes 0 No

Does Swing contains any heavy weight component?..

Answer / karthik

Yes ok

Example:

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class xx extends JFrame
{

xx()
{
Container con=getContentPane();
//this Heavy weight component Button
con.add(new Button("hhhhhhhhhhhhhhhhh"));
setVisible(true);
setSize(200,300);
}
public static void main(String aa[])
{
new xx();
}
}

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Swing Interview Questions

What are the two key features of swing?

0 Answers  


What class is at the top of the AWT event hierarchy?

0 Answers  


Is swing an api?

0 Answers  


What is java swing used for?

0 Answers  


What method is used to specify a container's layout?

0 Answers  






What is import javax swing?

0 Answers  


What is java swing application?

0 Answers  


How is multi-threading gets implemented using swing?

0 Answers  


Hello Everyone.. I m trying to develop a java swing application where i can display a doc file Jeditorpane or Jtextpane.

0 Answers  


What is the difference between AWT & Swing?

21 Answers   BeBo Technologies, Deshaw, TCS,


Is there any heavyweight component in swings?

0 Answers  


What are the swing components?

0 Answers  


Categories