previous | start | next

## Grid Layout

- Arranges components in a grid with a fixed number of rows and columns
- Resizes each component so that they all have same size
- Expands each component to fill the entire allotted area
- Add the components, row by row, left to right:

      JPanel numberPanel = new JPanel();
      numberPanel.setLayout(new GridLayout(4, 3));
      numberPanel.add(button7);
      numberPanel.add(button8);
      numberPanel.add(button9);
      numberPanel.add(button4);
      . . .

previous | start | next