Javatpoint Logo
Javatpoint Logo

Java GridLayout

The GridLayout is used to arrange the components in rectangular grid. One component is displayed in each rectangle.

Constructors of GridLayout class

  1. GridLayout(): creates a grid layout with one column per component in a row.
  2. GridLayout(int rows, int columns): creates a grid layout with the given rows and columns but no gaps between the components.
  3. GridLayout(int rows, int columns, int hgap, int vgap): creates a grid layout with the given rows and columns alongwith given horizontal and vertical gaps.

Example of GridLayout class

GridLayout class
Next TopicFlowLayout




Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA