I'm having this issue that I cannot find a solution for.
I'm using Robot.getPixelColor()
to get color of pixel at mouse pointer and it works great, however if I run a full screen application or game, it will display the color of the pixel in the background of the game (behind he game, in this case my desktop) instead of the color on the game.
Has anyone run in to similar issues?
The code is basically:
Robot robot = new Robot();
Color currentColor = robot.getPixelColor((int)MouseInfo.getPointerInfo().getLocation().getX(),(int)MouseInfo.getPointerInfo().getLocation().getY());
and then the color is placed as background of a jlabel.