code: public Dimension preferredLayoutSize (Container parent)
      {
          Rectangle rect = new Rectangle();
          Rectangle temp = new Rectangle();
          int pcount = parent.getComponentCount();
          for (int ii = 0; ii < pcount; ii++) {
              Component comp = parent.getComponent(ii);
              if (!comp.isVisible()) {
                  continue;
              }
  
              Object constr = _constraints.get(comp);
              if (constr == null) {
                  log.warning("No constraints for child!?", "cont", parent, "comp", comp);
                  continue;
              }
  
              if (constr instanceof Rectangle) {
                  rect.add((Rectangle)constr);
              } else {
                  Point p = (Point)constr;
                  Dimension d = comp.getPreferredSize();
                  temp.setBounds(p.x, p.y, d.width, d.height);
                  rect.add(temp);
              }
          }
  
          Dimension dims = new Dimension(rect.width, rect.height);
  
          // account for the insets
          Insets insets = parent.getInsets();
          dims.width += insets.left + insets.right;
          dims.height += insets.top + insets.bottom;
  
          return dims;
      }
docs: documentation inherited from interface