Important Java Mcq 1

Which of the following are true about flowlayout?

a. The default layout manager for an Applet is FlowLayout

b.  The default layout manager for an application is FlowLayout

c. A layout manager must be assigned to an Applet before the setSize method is called

d. The FlowLayout manager attempts to honor the preferred size of any components

Answer:

a. The default layout manager for an Applet is FlowLayout.

Explanation:

For Panels, including Applets, the default layout manager belongs to the class FlowLayout. For Windows, the default layout manager is a borderLayout. You can change thelayout manager of a container using its setLayout(LayoutManager) method.

Related MCQs
Aniket Malik

Aniket Malik

CERTIFIED TUTOR/TRAINER WITH 300+ REVIEWS

Facing difficulty with

this concept?