public static void dragMouse(final Component comp, int button, final int startX,
			final int startY, final int endX, final int endY, int modifiers) {

		int nonRelesedModifiers = convertToExtendedModifiers(modifiers, button, false);
		int relesedModifiers = convertToExtendedModifiers(modifiers, button, true);
		postEvent(new MouseEvent(comp, MouseEvent.MOUSE_PRESSED, System.currentTimeMillis(),
			nonRelesedModifiers, startX, startY, 1, false, button));
		postEvent(new MouseEvent(comp, MouseEvent.MOUSE_DRAGGED, System.currentTimeMillis(),
			nonRelesedModifiers, endX, endY, 1, false, button));
		postEvent(new MouseEvent(comp, MouseEvent.MOUSE_RELEASED, System.currentTimeMillis(),
			relesedModifiers, endX, endY, 1, false, button));

	}
Simulates a mouse drag action

@param comp the component to drag on.
@param button the mouse button (1, 2, or 3)
@param startX the x coordinate of the start drag location
@param startY the y coordinate of the start drag location
@param endX the x coordinate of the end drag location
@param endY the y coordinate of the end drag location
@param modifiers additional modifiers (e.g. MouseEvent.SHIFT_MASK)
Ghidra/Framework/Gui/src/main/java/generic/test/AbstractGuiTest.java