Q. An Applet has its Layout Manager set to the default of FlowLayout. What code would bethe correct to change to another Layout Manager? (Solved)

1. setLayoutManager(new GridLayout());

2. setLayout(new GridLayout(2,2));

3. setGridLayout(2,2);

4. setBorderLayout();

  • b. setLayout(new GridLayout(2,2));
Subscribe Now

Get All Updates & News