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 |
Is swing better than awt?
Why swings are used in java?
What are the benefits if Swing over AWT?
Can a class be it?s own event handler? Explain how to implement this?
What is meant by JFC?
Name the borders provided by Swing?
How do you swing an applet?
How to generate bill in java swing?
am searching for the job based on java, swing, currently working small company. they are not giving any salary slip, offer letter. so if i try outside for MNC's they start with previous company details. what should i do..? please help me to get job and make my career.
What is a swing day?
What are the benefits of swing over awt?
Write a program to paint the off-screen buffer in swings