code: @Override
      public void addLayoutComponent(Component comp, Object constraints) {
          checkNotNull(constraints, "The constraints must not be null.");
          if (constraints instanceof String) {
              setConstraints(comp, new CellConstraints((String) constraints));
          } else if (constraints instanceof CellConstraints) {
              setConstraints(comp, (CellConstraints) constraints);
          } else {
              throw new IllegalArgumentException("Illegal constraint type " + constraints.getClass());
          }
      }
docs: Adds the specified component to the layout, using the specified {@code constraints} object.
  Note that constraints are mutable and are, therefore, cloned when cached.
  
  @param comp the component to be added
  @param constraints the component's cell constraints
  @throws NullPointerException if {@code constraints} is {@code null}
  @throws IllegalArgumentException if {@code constraints} is neither a String, nor a
  CellConstraints object, or a String that is rejected by the CellConstraints construction