public void setPosition (String name)
	{
		if (Global.getParameter(name + ".maximized", false))
		{
			setExtendedState(Frame.MAXIMIZED_BOTH);
			return;
		}
		Point l = getLocation();
		Dimension d = getSize();
		Dimension dscreen = getToolkit().getScreenSize();
		int x = Global.getParameter(name + ".x", l.x);
		int y = Global.getParameter(name + ".y", l.y);
		int w = Global.getParameter(name + ".w", d.width);
		int h = Global.getParameter(name + ".h", d.height);
		if (w > dscreen.width) w = dscreen.width;
		if (h > dscreen.height) h = dscreen.height;
		if (x < 0) x = 0;
		if (x + w > dscreen.width) x = dscreen.width - w;
		if (y < 0) y = 0;
		if (y + h > dscreen.height) y = dscreen.height - h;
		setLocation(x, y);
		setSize(w, h);
	}