// get all graphic devices attached to computer
GraphicsDevice[] gs = ge.getScreenDevices();
// create dump entry for each device
for (int i=0; i < gs.length; i++) {
DisplayMode mode = gs[i].getDisplayMode();
Rectangle bounds = new Rectangle(0, 0, mode.getWidth(), mode.getHeight());
BufferedImage screenshot = new Robot(gs[i]).createScreenCapture(bounds);
// to attach your entry to destination you have to execute this line
OutputStream outputStream = destination.add("screenshot/display_" + i + ".png");
ImageIO.write(screenshot, "PNG", outputStream);