标签归档:Java

RSS feed of Java

Java获取屏幕截图示例

Java实现屏幕截图获取需要使用java.awt包下的工具类

一个最简单的获取屏幕截图的代码实现如下所示:


import java.awt.AWTException;
import java.awt.Dimension;
import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;

public class ScreenshotGetter {
	public BufferedImage getScreenshot() throws AWTException {
		final Robot robot = new ...

继续阅读