通過java.awt.Robot的createScreenCapture截屏.
public static void captureScreen(String fileName) throws Exception {
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Rectangle screenRectangle = new Rectangle(screenSize);
Robot robot = new Robot();
BufferedImage image = robot.createScreenCapture(screenRectangle);
ImageIO.write(image, "png", new File(fileName));
}
(澳門)炒家、用家 樓市拉鋸戰
13 年前
沒有留言:
張貼留言