Color pixel = new Color(0,0,0);
Robot robot;
Point mousepoint;
int R,G,B;
MouseInfo mouseinfo;
robot = new Robot();
mousepoint = mouseinfo.getPointerInfo().getLocation();
pixel = robot.getPixelColor(mousepoint.x,mousepoint.y);
R = pixel.getRed();
G = pixel.getGreen();
B = pixel.getBlue();
本文地址:http://com.8s8s.com/it/it14335.htm