A GridBagLayout consists of one or more GridBagConstraints. Each element's attributes are added to the GridBagConstraints, and then the element itself is added to the GridBagLayout. One can envision a grid, with components that are able to cover more than one grid cell. Each component specifies how many cells it will take up in each direction, as well as whether or not to expand (and in which directions) if space is available.