如何用Java截屏?
使用Robot#createScreenCapture()。
Robot#createScreenCapture()
BufferedImage image = new Robot().createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize())); ImageIO.write(image, "png", new File("/screenshot.png"));