Showing posts with label gridlayout constructers. Show all posts
Showing posts with label gridlayout constructers. Show all posts

Tuesday, 11 March 2014

LAYOUT MANAGERS:GridLayout

A GridLayout places components in a grid of cells


GridLayout

GridLayout lays out components in a two dimensional grid.When you instantiate a gridLayout ,you define the number of rows and columns.A GridLayout places components in a grid of cells.Each component takes all the available space within its cell.Each cell is exactly the same size.Components are added to the layout from left to right, top to bottom.

The constructers supported by the GridLayout are shown here


  • GridLayout():create a single_column grid layout
  • GridLayout(int rows, int columns):Creates a grid layout with the specified number of rows and columns.
  •  GridLayout(int rows, int columns, int horizontalGap, int verticalGap):To specify the horizontal and vertical space left between components in horzontalGap and verticalGap