private void recenterMouse(final Component component) {
        if (robot != null) {
            eventsSinceRecenter = 0;
            isRecentering = true;
            if (grabLocation.x == 0 && grabLocation.y == 0) {
                centerLocation.setLocation(component.getWidth() / 2, component.getHeight() / 2);
            } else {
                centerLocation.setLocation(grabLocation.x, grabLocation.y);
            }
            centerLocationOnScreen.setLocation(centerLocation);
            SwingUtilities.convertPointToScreen(centerLocationOnScreen, component);
            robot.mouseMove(centerLocationOnScreen.x, centerLocationOnScreen.y);
        }
    }
<code>AwtMouseInput</code>

@author Joshua Slack
@author MHenze (cylab)

@version $Revision$
jme3-desktop/src/main/java/com/jme3/input/awt/AwtMouseInput.java