private void layoutContainerVertically(Container parent)
	{
		int components = parent.getComponentCount();
		int visibleComponents = getVisibleComponents( parent );

		if (components == 0) return;

		//  Determine space available for components using relative sizing

		float relativeTotal = 0.0f;
		Insets insets = parent.getInsets();
		int spaceAvailable = parent.getSize().height
						   - insets.top
						   - insets.bottom
						   - ((visibleComponents - 1) * gap)
						   - (2 * borderGap);

		for (int i = 0 ; i < components ; i++)
		{
			Component component = parent.getComponent(i);

			if (! component.isVisible()) continue;

			Float constraint = constraints.get(component);

			if (constraint == null)
			{
				Dimension d = component.getPreferredSize();
				spaceAvailable -= d.height;
			}
			else
			{
				relativeTotal += constraint.doubleValue();
			}
		}

		//  Allocate space to each component using relative sizing

		int[] relativeSpace = allocateRelativeSpace(parent, spaceAvailable, relativeTotal);

		//  Position each component in the container

		int x = insets.left;
		int y = insets.top + borderGap;
		int insetGap = insets.left + insets.right;
		int parentWidth = parent.getSize().width - insetGap;

		for (int i = 0 ; i < components ; i++)
		{
			Component component = parent.getComponent(i);

			if (! component.isVisible()) continue;

			if (i > 0)
				y += gap;

			Dimension d = component.getPreferredSize();

			if (fill)
				d.width = parentWidth - fillGap;

			Float constraint = constraints.get(component);

			if (constraint == null)
			{
				component.setSize( d );
				int locationX = getLocationX(component, parentWidth) + x;
				component.setLocation(locationX, y);
				y += d.height;
			}
			else
			{
				int height = relativeSpace[i];
				component.setSize(d.width, height);
				int locationX = getLocationX(component, parentWidth) + x;
				component.setLocation(locationX, y);
				y += height;
			}

		}
	}