How to add panel to a Frame?
Answers were Sorted based on User's Feedback
Answer / thirumal.r
JFrame f=new JFrame();
JPanel p=new JPanel();
f.add(p,BorderLayout.CENTER);
| Is This Answer Correct ? | 19 Yes | 1 No |
Answer / jitendra
JPanel p1 = new JPanel();
p1.setLayout(new BorderLayout());
| Is This Answer Correct ? | 17 Yes | 3 No |
why we import both packages java.awt.*; and java.awt.event.*; as java.awt.*; can import all classes na. then what is the need of importing java.awt.event.*; ?
What is the access scope of a protected method?
What is the difference between JDBC 1.0 and JDBC 2.0?
Difference between final and effectively final ?
what is j2se
Hi am an mca graduate . i have done bsc maths in my degree . every company asks me why you make shift from maths group to computere field . What i need to answer?
Why we override equals() method?
What are methods of a class?
Can a static block throw exception?
Can a class be protected in java?
How big is a gigabyte?
why Runnable interface is preferable than extending the Thread class?
7 Answers Aizza, College School Exams Tests, Sybrant Technologies, Wipro,