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 the difference between pass by reference and pass by pointer?

0 Answers  


What is are packages?

0 Answers  


What will happens if you opened Internet Explorer 4 times?

2 Answers  


List the features of java programming language.

0 Answers  


What is a boolean expression in java?

0 Answers  






What is the difference between processes and threads?

0 Answers  


how to one war file class to another war file class?

0 Answers  


What is the purpose of the runtime class in java programming?

0 Answers  


What do you mean by platform independence? What is an interface?

0 Answers  


which method throws exception of type Throwable

2 Answers  


What is the need of transient variables in Java ?

0 Answers   MCN Solutions,


v-model life cycle

0 Answers   Virtusa,


Categories