code: public void setConstraints(Component component, CellConstraints constraints) {
          checkNotNull(component, "The component must not be null.");
          checkNotNull(constraints, "The constraints must not be null.");
          constraints.ensureValidGridBounds(getColumnCount(), getRowCount());
          constraintMap.put(component, (CellConstraints) constraints.clone());
      }
docs: Sets the constraints for the specified component in this layout.
  
  @param component the component to be modified
  @param constraints the constraints to be applied
  @throws NullPointerException if {@code component} or {@code constraints} is {@code null}