How to add panel to a Frame?

Answer Posted / jitendra

JPanel p1 = new JPanel();
p1.setLayout(new BorderLayout());

Is This Answer Correct ?    17 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the access modifiers available in java?

558


What are the advantages of java inner classes?

555


Does java allow default arguments?

589


Can a java program have 2 main methods?

543


What do you mean by stack?

640






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

563


What are the main differences between the java platform and other platforms?

526


What is maximum size of arraylist in java?

490


Explain about the security aspect of java?

568


Can we execute java program without main method?

516


What is thread pool in java with example?

539


Which is better stringbuilder or stringbuffer?

526


Why stringbuilder is not thread safe?

537


What are the four pillars of java?

608


What is meant by 'bit masking' in java?

642