不要被这个世界改变!|

Java 屏幕拷贝 ScreenShot

这本来是个分享的,但插件不好使了,等有时间在搞一个
 
						import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.io.File;

import javax.imageio.ImageIO;

public class screen2image
{
    public static void main(String[] args) throws Exception
    {
        Robot robot = new Robot();
         
        BufferedImage screenShot = robot.createScreenCapture(
            new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));
        ImageIO.write(screenShot, "JPG", new File("screenShot.jpg"));
    }
}
						//该余额宝领红包码来自于http://www.codesnippet.cn/detail/180320132475.html