Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有什么java.awt.Graphics方法可以用来复制当前屏幕的矩形部分并将其存储为图像变量?如果不是,我可以使用的最佳替代品是什么?
java.awt.Graphics
如果小程序已签名并具有足够的权限,java.awt.Robot则可用。
java.awt.Robot
Robot robot = new Robot(); Rectangle rect = new Rectangle(0, 0, displayMode.getWidth(), displayMode.getHeight()); BufferedImage image = robot.createScreenCapture(rect);