public void layoutContainer(Container parent) {
		Component[] components = parent.getComponents();
		Dimension totalSize = parent.getSize();

		int dx = totalSize.width / 2;
		int dy = totalSize.height / 2;

		// make one quick pass to get max(PreferredSize.width[1..n]
		int width = 0, height = 0;
		for (int i=0; i < components.length; i++) {
			width = Math.max(width, components[i].getPreferredSize().width);
			height = Math.max(height, components[i].getPreferredSize().height);
		}
		int componentPad = Math.max(width, height) / 2;

		int PAD = 10;
		// Assumed to be regular (circle, not ellipse).
		int radius = dx - componentPad - PAD;

		int degreesPer = 360 / components.length;
		int angle = startAtTop ? 0 : degreesPer/2;

		for (int i=0; i < components.length; i++, angle += degreesPer) {
			Component c = components[i];
			Dimension d = c.getPreferredSize();
			double theta = Math.toRadians(angle);
			int x = (int)(Math.sin(theta) * radius);
			int y = (int)(Math.cos(theta) * radius);
			if (debug)
				System.out.println(c.getClass().getName() + 
				" " + angle + ", " + theta +
				", x=" + x + ", y=" + y);
			c.setBounds(dx + x - (d.width/2), dy + y - (d.height/2),
				d.width, d.height);
		}
	}