title: java print screen two monitors
body: <p>I'm trying to use print screen image area to get 2 monitors, but only works for one monitor. Can you advise me how to get figure 2 monitors?      </p>
  
  <pre><code>        Robot robot = new Robot();    
          Rectangle screenRect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
          BufferedImage capture = new Robot().createScreenCapture(screenRect);
          ImageIO.write(capture, "bmp", new File("printscreen.bmp"));
  </code></pre>