Check Mouse Position

So I'm really new at this so sorry if this is a stupid question. When I hold down the F key I want to check the location of the mouse (I have an Absolute Mouse set up in my Main class) and if it is over an object I want to move the object with the mouse - click and drag but with a keypress instead of a click.

This is my action class:

import treattatt.Main;

import com.jme.input.RelativeMouse;
import com.jme.math.Vector2f;
import com.jme.math.Vector3f;
import com.jme.input.action.InputActionEvent;
import com.jme.input.action.MouseInputAction;
import com.jme.input.MouseInput;
import com.jme.intersection.BoundingPickResults;
import com.jme.intersection.PickResults;
import com.jme.input.InputSystem;
import com.jme.scene.Node;
import com.jme.math.Ray;

 * @author jack
public class forceAction extends MouseInputAction {

here is a slightly different way to check mouse position over something(a quad in this case)

public boolean isMouseOverButton(){
      float mousex = MouseInput.get().getXAbsolute();
      float mousey = MouseInput.get().getYAbsolute();
      float menuItemLeftEdge = buttonQuad.getWorldTranslation().x - (buttonWidth / 2);
      float menuItemRightEdge = buttonQuad.getWorldTranslation().x + (buttonWidth / 2);
      float menuItemTopEdge = buttonQuad.getWorldTranslation().y - (buttonHeight / 2);
      float menuItemBottomEdge = buttonQuad.getWorldTranslation().y + (buttonHeight / 2);
      return (mousex > menuItemLeftEdge && mousex < menuItemRightEdge && mousey > menuItemTopEdge && mousey < menuItemBottomEdge);

for display:


and to move box you have to update position corresponding to the mouse position, something like: box.setLocalTranslation(mousex, mousey, 0) and dont forget to updateGeometricState