Constraints constraints1 = getConstraints(c1); Constraints constraints2 = getConstraints(c2);  Spring strut = Spring.constant(pad); Spring otherEdge = constraints2.getConstraint(e2); constraints1.setConstraint(e1, Spring.sum(strut, otherEdge));
putConstraint(e1, c1, Spring.constant(pad), e2, c2);
  public void putConstraint(String e1, Component c1, int pad, String e2,                             Component c2)  {    Constraints constraints1 = getConstraints(c1);    Constraints constraints2 = getConstraints(c2);    Spring strut = Spring.constant(pad);    Spring otherEdge = constraints2.getConstraint(e2);    constraints1.setConstraint(e1, Spring.sum(strut, otherEdge));  }