Quizás esta clase que hice te sirva:
package test;
import java.awt.Dimension;
import java.awt.Robot;
import java.awt.AWTException;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.awt.Rectangle;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
public class Test {
public static void main
(String[] args
) { try {
d
= Toolkit.
getDefaultToolkit().
getScreenSize(); e.printStackTrace();
}
try {
ImageIO.write(b, "jpg", f);
System.
out.
println("Pantallazo capturado y guardado ;)"); e.printStackTrace();
}
}
}