Adds a component to the grid in the specified area. The area is defined by specifying the upper left corner (column1, row1) and the lower right corner (column2, row2) of the area. The coordinates are zero-based.
If the area overlaps with any of the existing components already present in the grid, the operation will fail and an {@link OverlapsException} isthrown.
@param component the component to be added, not
null
.
@param column1 the column of the upper left corner of the area
c
is supposed to occupy. The leftmost column has index 0.
@param row1 the row of the upper left corner of the area
c
is supposed to occupy. The topmost row has index 0.
@param column2 the column of the lower right corner of the area
c
is supposed to occupy.
@param row2 the row of the lower right corner of the area
c
is supposed to occupy.
@throws OverlapsException if the new component overlaps with any of the components already in the grid.
@throws OutOfBoundsException if the cells are outside the grid area.