title: Fetching coordinates for top left position of top left monitor
body: <p>I am trying to fetch the coordinates of the top left position in a multimonitor setup for my screen capture program. Here is what I've currently got for the program:</p>
  
  <pre><code>        int dwidth = 0, dheight = 0; //max dimensions of all monitors
      for (GraphicsDevice gd : GraphicsEnvironment
              .getLocalGraphicsEnvironment().getScreenDevices()) {
          if (gd == GraphicsEnvironment.getLocalGraphicsEnvironment()
                  .getDefaultScreenDevice()) {
              minx = -width; //My attempt at finding the minimum X value did not work
          }
          dwidth += gd.getDisplayMode().getWidth();
          dheight += gd.getDisplayMode().getHeight();
      }
  </code></pre>
  
  <p>Basically I want to be able to run my program across all of the monitors. For full code view here: <a href="https://gist.github.com/fletchto99/5788659" rel="nofollow">https://gist.github.com/fletchto99/5788659</a></p>