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 |
What is dot operator?
What is the life cycle of Thread ?
12 Answers HCL, Varnar Softech,
What is the difference between a Window and a Frame?
When super keyword is used?
What is use of static in java?
What is a layout manager and what are different types of layout managers available in java awt?
Why method overloading and method overriding required in java?
Differences between traditional programming language and object oriented programming language?
can java object be locked down for exclusive use by a given thread? : Java thread
What is Transient and volatile
How to find the index of the largest number in an arraylist java?
How to count occurrences of each duplicate element in a list {a,b,d,c,a,b} ? Thanks in Advance