Answer Posted / 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 View All Answers
Which method is used by the applet to recognize the height and width?
What is swing and its features in java?
Which package is needed for swing components?
What are swings awt?
Is java swing deprecated?
What is jfc? What are the features of jfc?
What is the use of jcomponent class in swing?
What are the components of swing?
What are heavyweight components? What is lightweight component?
What is jlabel java swing?
What are the differences between Swing and AWT?
What are the advantage of swing over awt?
Is there any heavyweight component in swings?
What is the function of internal frame in swing?
What is import javax swing?