How to return the location of my mouse pointer in java? -
i know robot class can move mouse (x,y) coordinate there way return (x,y) coordinate mouse hovering over? or possibly way see (x,y) coordinate have last clicked.
i'm using returns map out specific order of coordinates need clicked , don't want guess pixel on 4k screen.
pointerinfo = mouseinfo.getpointerinfo(); point b = a.getlocation(); int x = (int) b.getx(); int y = (int) b.gety(); robot r = new robot(); r.mousemove(x + 100 , y + 100 );
Comments
Post a Comment