How to add panel to a Frame?

Answers were Sorted based on User's Feedback



How to add panel to a Frame?..

Answer / neema

yes panel can be added to a frame

Is This Answer Correct ?    40 Yes 10 No

How to add panel to a Frame?..

Answer / thirumal.r

JFrame f=new JFrame();
JPanel p=new JPanel();
f.add(p,BorderLayout.CENTER);

Is This Answer Correct ?    19 Yes 1 No

How to add panel to a Frame?..

Answer / jitendra

JPanel p1 = new JPanel();
p1.setLayout(new BorderLayout());

Is This Answer Correct ?    17 Yes 3 No

How to add panel to a Frame?..

Answer / dfdfffdfdf

dsaffasfs

Is This Answer Correct ?    2 Yes 7 No

How to add panel to a Frame?..

Answer / sumanta

frame.getContentPane().add(sc,null);

Is This Answer Correct ?    16 Yes 22 No

Post New Answer

More Core Java Interview Questions

Explain the importance of thread scheduler in java?

0 Answers  


What are the types of arrays in java?

0 Answers  


Explain jvm, jre, and jdk?

0 Answers  


What is a blocking method in Java?

0 Answers  


What is this keyword used for?

0 Answers  






hi am an engineering student and my next plan is for ms in either in us or australia i got my passport but i dont know anything bout visa can u give brief idea 1)How to get prepared for visa and 2)How to apply for top universities and 3)How to pay the fee and so on These all are basic questions plz give me a clear idea

0 Answers  


Why does java not allow multiple public classes in a java file ?

2 Answers  


why we r not use pointers in corejava?

2 Answers   Samsung,


What do u mean by wrapper Class? What do u mean by Jvm... How do u change JVM for other OS? Or No need to Change ...? its like tricky

6 Answers   Accenture, EDS,


How do you identify if jvm is 32-bit or 64-bit from java program?

0 Answers  


How to access a variable if it is declared as private?

3 Answers  


What is thread?

7 Answers   BMC, Virtusa,


Categories