How to add panel to a Frame?

Answer Posted / thirumal.r

JFrame f=new JFrame();
JPanel p=new JPanel();
f.add(p,BorderLayout.CENTER);

Is This Answer Correct ?    19 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can anonymous class have constructor?

550


What is the concept of multithreading?

520


What is an infinite loop? How infinite loop is declared?

568


Differentiate between overriding and overloading cases?

595


How many times finalize method will be invoked? Who invokes finalize() method in java?

572






What is java instanceof operator?

559


What is boolean law?

514


What is static in java?

555


Why do we need wrapper class?

535


what are Hostile Applets?

1598


What are advantages of exception handling in java?

581


What are the four integer types supported by java?

558


What’s the difference between constructors and other methods?

529


What is the difference between numeric and integer?

509


What is this keyword used for?

684