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:
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();
}
Basically I want to be able to run my program across all of the monitors. For full code view here: https://gist.github.com/fletchto99/5788659