if (action.equals("onmouseup")) {
Robot robot = new Robot();
Point p = getCoordinates(returnMap);
robot.mouseMove(p.x, p.y);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
} else if (action.equals("onmousedown")) {
Robot robot = new Robot();
Point p = getCoordinates(returnMap);
robot.mouseMove(p.x, p.y);