67.4k views
1 vote
In Java, which of these classes implement the LayoutManagerinterface?

?? RowLayout

?? ColumnLayout

?? GridBagLayout

?? FlowLayoutManager

1 Answer

3 votes

Answer:

GridBagLayout,FlowLayoutManager

Step-by-step explanation:

LayoutManager interface is the interface used for laying out containers.Components like Button,text boxes are placed by Layout Manager,it is used to determine size and position of components in a container.

We can implement this interface via many classes like -

SpringLayout, SynthScrollBarUI, ViewportLayout , FlowLayout, GridBagLayout, GridLayout etc.

GridBagLayout-This layout arranges the components in vertical,horizontal or in baseline irrespective of their size.The orientation of the GridBagLayout depends on the container's ComponentOrientation property.

GridBagLayout is associated with an instance of GridBagConstraints which manages each component.

FlowLayoutManager-This layout arranges the components in a directional flow. The alignment of line is determined by componentOrientation.

ComponentOrientation .LEFT_TO_RIGHT

ComponentOrientation.RIGHT_TO_LEFT

User Nishanth Anand
by
4.9k points