Multiple choice technology programming languages

What method is used to specify a container's layout?

  1. SetLayout

  2. SetBoundries

  3. SetBorder

  4. SetLayouts

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The setLayout() method is used to specify or change a container's layout manager in Java AWT/Swing. This method takes a LayoutManager object as a parameter and determines how components are arranged within the container. Options B, C, and D are not valid methods in the Java API.