/** * Performs a drag action at the given location. * * @param target the target AWT or Swing {@code Component}. * @param where the point where to start the drag action. */ @RunsInEDT public void drag(@Nonnull Component target, @Nonnull Point where) { robot.pressMouse(target, where, LEFT_BUTTON); int dragDelay = settings().dragDelay(); if (dragDelay > delayBetweenEvents()) { pause(dragDelay); } mouseMove(target, where.x, where.y); robot.waitForIdle(); }