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 parse method?
What is multi-catch block in java?
what is difference Between Core Java and advance java
60 Answers HCL, HP, Sambalpur University, TCS, Vensai Technologies, Wipro,
What is method overloading with type promotion?
Why do we use variables?
Is a boolean variable?
What do you mean by global variable?
wHAT IS DEFAULT SPECIFIER IN JAVA wHAT IS DEFAULT CONSTRUCTOR IN JAVA wHAT IS DEFAULT METHOD IN JAVA
finalize() method?
In what circumstances, compiler will supply a default constructor for a class?
Can we call a non-static method from inside a static method?
How do constructors use this() and super()?