public BufferedImage captureFullScreen() {
Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
//屏幕宽度
int screenWidth = (int) dimension.getWidth();
//屏幕高度
int screenHeight = (int) dimension.getHeight();
//从x坐标为0,y坐标为0的位置开始截取(左上角)
return robot.createScreenCapture(new Rectangle(0, 0, screenWidth, screenHeight));
}