public static void pressKey(Robot robot, int key) {
		GraphicsEnvironment env = GraphicsEnvironment
				.getLocalGraphicsEnvironment();
		GraphicsDevice screen = env.getDefaultScreenDevice();
		if (robot == null) {
			try {
				robot = new Robot(screen);
			} catch (AWTException ex) {
				System.out.println(ex);
			}
		}
		robot.keyPress(key);
	}