public static void clickMouse(Component comp, int button, int x, int y, int clickCount,
			int modifiers, boolean popupTrigger) {

		int nonRelesedModifiers = convertToExtendedModifiers(modifiers, button, false);
		int relesedModifiers = convertToExtendedModifiers(modifiers, button, true);
		for (int cnt = 1; cnt <= clickCount; ++cnt) {
			postEvent(new MouseEvent(comp, MouseEvent.MOUSE_PRESSED, System.currentTimeMillis(),
				nonRelesedModifiers, x, y, cnt, false, button));
			postEvent(new MouseEvent(comp, MouseEvent.MOUSE_CLICKED, System.currentTimeMillis(),
				nonRelesedModifiers, x, y, cnt, false, button));
			postEvent(new MouseEvent(comp, MouseEvent.MOUSE_RELEASED, System.currentTimeMillis(),
				relesedModifiers, x, y, cnt, popupTrigger, button));
		}
	}
Simulates click the mouse button.

@param comp the component to click on.
@param button the mouse button (1, 2, or 3)
@param x the x coordinate of the click location
@param y the y coordinate of the click location
@param clickCount the number of clicks (2 = double click)
@param modifiers additional modifiers (e.g. MouseEvent.SHIFT_MASK)
@param popupTrigger a boolean, true if this event is a trigger for a
           popup menu
Ghidra/Framework/Gui/src/main/java/generic/test/AbstractGuiTest.java