Does Swing contains any heavy weight component?
Answers were Sorted based on User's Feedback
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 |
Answer / kalpit
With Swing only the top-level components are heavyweight:
JApplet,JFrame, JDialog, and JWindow.
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / naresh tuhania
In swing all top-level components are heavyweight
| Is This Answer Correct ? | 2 Yes | 0 No |
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 |
What is the what is the difference between invokeandwait() and invokelater()? ?
What are the advantage of swing over awt?
Which method is used by the applet to recognize the height and width?
What is swing in java javatpoint?
how can u handle runtime exceptions in java plz explain with examples briefly?
Why do we use swing in java?
What is jpanel in java swing with example?
What are differences between swing and awt?
What is the difference between AWT & Swing?
21 Answers BeBo Technologies, Deshaw, TCS,
What is jpanel swing?
What are the swing components in java?
What is the purpose of transferhandler class?