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

What is dot operator?

0 Answers  


What is the life cycle of Thread ?

12 Answers   HCL, Varnar Softech,


What is the difference between a Window and a Frame?

6 Answers   Infosys, ProKarma,


When super keyword is used?

0 Answers  


What is use of static in java?

0 Answers  


What is a layout manager and what are different types of layout managers available in java awt?

0 Answers  


Why method overloading and method overriding required in java?

1 Answers   Ericsson, Wipro,


Differences between traditional programming language and object oriented programming language?

0 Answers  


can java object be locked down for exclusive use by a given thread? : Java thread

0 Answers  


What is Transient and volatile

10 Answers   iFlex,


How to find the index of the largest number in an arraylist java?

0 Answers  


How to count occurrences of each duplicate element in a list {a,b,d,c,a,b} ? Thanks in Advance

2 Answers   TCS,


Categories