Robot robot = new Robot();
robot.mouseMove(p.x, p.y);
while (display.readAndDispatch());
try { Thread.sleep(20); } catch (InterruptedException _) { }
robot.mousePress(button);
while (display.readAndDispatch());
try { Thread.sleep(20); } catch (InterruptedException _) { }
robot.mouseRelease(button);
while (display.readAndDispatch());
try { Thread.sleep(20); } catch (InterruptedException _) { }