public void layoutContainer(Container parent) {
		Debug.println("layout","layoutContainer:");
		if (!validWidths)
			return;
		Component[] components = parent.getComponents();
		Dimension contSize = parent.getSize();
		int x = 0;
		for (int i=0; i<components.length; i++) {
			int row = i / COLUMNS;
			int col = i % COLUMNS;
			Component c = components[i];
			Dimension d = c.getPreferredSize();
			int colWidth = (int)(contSize.width * widthPercentages[col]);

			if (col == 0) {
				x = hpad;
			} else {
				x += hpad * (col-1) + 
					(int)(contSize.width * widthPercentages[col-1]);
			}
			int y = vpad * (row) + (row * heights[row]) + (heights[row]-d.height);
			Rectangle r = new Rectangle(x, y, colWidth, d.height);
			c.setBounds(r);
		}
	}