public static void positionAndAdd(JComponent component, double percentX,
			double percentY, JComponent container)
	{
		int c_width = component.getPreferredSize().width;
		int c_height = component.getPreferredSize().height;

		int width = container.getWidth();
		int height = container.getHeight();

		component.setBounds((int) (width * percentX - c_width / 2.0), // the centered x bound
				(int) (height * percentY - c_height / 2.0), // the centered y bound
				c_width, // the width
				c_height); // the height

		container.add(component);
	}