Java如何截屏

走着路睡觉
  • java
小于 1 分钟

   Rectangle screenRect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
        BufferedImage capture = new Robot().createScreenCapture(screenRect);
        ImageIO.write(capture, "png", new File("C:\\Users\\zhaojingbo\\Desktop\\a.png"));
上次编辑于:
贡献者: zhaojingbo
Loading...