java实现屏幕取色

类别:Java 点击:0 评论:0 推荐:
  
  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