📅  最后修改于: 2022-03-11 14:52:27.443000             🧑  作者: Mango
BufferedImage image = new Robot().createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));
ImageIO.write(image, "png", new File("/screenshot.png"));