}
  public SpringLayout.Constraints getConstraints(Component c)  {    Constraints constraints = (Constraints) constraintsMap.get(c);    if (constraints == null)      {        Container parent = c.getParent();        constraints = new Constraints();        if (parent != null)          {            constraints.setX              (Spring.constant(parent.getInsets().left));            constraints.setY              (Spring.constant(parent.getInsets().top));          }        else          {            constraints.setX              (Spring.constant(0));            constraints.setY              (Spring.constant(0));          }        constraints.setWidth          (Spring.constant(c.getMinimumSize().width,                           c.getPreferredSize().width,                           c.getMaximumSize().width));        constraints.setHeight          (Spring.constant(c.getMinimumSize().height,                           c.getPreferredSize().height,                           c.getMaximumSize().height));        constraintsMap.put(c, constraints);      }    return constraints;  }