public Dimension preferredLayoutSize(Container target) {

		synchronized (target.getTreeLock()) {

			Dimension dim = new Dimension(0, 0);

			if (eastComponent != null) {
				Dimension d = eastComponent.getPreferredSize();
				dim.width += d.width + getHgap();
				dim.height = Math.max(d.height, dim.height);
			}
			if (westComponent != null) {
				Dimension d = westComponent.getPreferredSize();
				dim.width += d.width + getHgap();
				dim.height = Math.max(d.height, dim.height);
			}
			if (centerComponent != null) {
				Dimension d = centerComponent.getPreferredSize();
				dim.width += d.width;
				dim.height = Math.max(d.height, dim.height);
			}
			if (northComponent != null) {
				Dimension d = northComponent.getPreferredSize();
				dim.width = Math.max(d.width, dim.width);
				if (overlapSide != NORTH) {
					dim.height += d.height + (getVgap() < 0 ? 0 : getVgap());
				}
				else {
					dim.height += d.height + getVgap();
				}
			}
			if (southComponent != null) {
				Dimension d = southComponent.getPreferredSize();
				dim.width = Math.max(d.width, dim.width);
				if (overlapSide != SOUTH) {
					dim.height += d.height + (getVgap() < 0 ? 0 : getVgap());
				}
				else {
					dim.height += d.height + getVgap();
				}
			}

			Insets insets = target.getInsets();
			dim.width += insets.left + insets.right;
			dim.height += insets.top + insets.bottom;

			return dim;
		}

	}