	private static Point getPointerLocation(final Component component) {
		try {
			final Class MouseInfo_class = Class.forName("java.awt.MouseInfo");
			final Method getPointerInfo_method = MouseInfo_class.getMethod("getPointerInfo", null);
			final Class PointerInfo_class = Class.forName("java.awt.PointerInfo");
			final Method getDevice_method = PointerInfo_class.getMethod("getDevice", null);
			final Method getLocation_method = PointerInfo_class.getMethod("getLocation", null);
			return (Point)AccessController.doPrivileged(new PrivilegedExceptionAction() {
				public final Object run() throws Exception {
					Object pointer_info = getPointerInfo_method.invoke(null, null);
					GraphicsDevice device = (GraphicsDevice)getDevice_method.invoke(pointer_info, null);
					if (device == component.getGraphicsConfiguration().getDevice()) {
						return (Point)getLocation_method.invoke(pointer_info, null);
					} else
						return null;
				}
			});
		} catch (PrivilegedActionException e) {
			LWJGLUtil.log("Failed to query pointer location: " + e.getCause());
		} catch (NoSuchMethodException e) {
			LWJGLUtil.log("Failed to query pointer location: " + e);
		} catch (IllegalAccessException e) {
			LWJGLUtil.log("Failed to query pointer location: " + e);
		} catch (ClassNotFoundException e) {
			LWJGLUtil.log("Failed to query pointer location: " + e);
		}
		return null;
	}

	private static Point getPointerLocation(final Component component) {
		try {
			final Class MouseInfo_class = Class.forName("java.awt.MouseInfo");
			final Method getPointerInfo_method = MouseInfo_class.getMethod("getPointerInfo", null);
			final Class PointerInfo_class = Class.forName("java.awt.PointerInfo");
			final Method getDevice_method = PointerInfo_class.getMethod("getDevice", null);
			final Method getLocation_method = PointerInfo_class.getMethod("getLocation", null);
			return (Point)AccessController.doPrivileged(new PrivilegedExceptionAction() {
				public final Object run() throws Exception {
					Object pointer_info = getPointerInfo_method.invoke(null, null);
					GraphicsDevice device = (GraphicsDevice)getDevice_method.invoke(pointer_info, null);
					if (device == component.getGraphicsConfiguration().getDevice()) {
						return (Point)getLocation_method.invoke(pointer_info, null);
					} else
						return null;
				}
			});
		} catch (PrivilegedActionException e) {
			LWJGLUtil.log("Failed to query pointer location: " + e.getCause());
		} catch (NoSuchMethodException e) {
			LWJGLUtil.log("Failed to query pointer location: " + e);
		} catch (ClassNotFoundException e) {
			LWJGLUtil.log("Failed to query pointer location: " + e);
		}
		return null;
	}
