画面キャプチャ プログラムのマルチモニター設定で、左上の位置の座標を取得しようとしています。これが私が現在プログラムのために持っているものです:
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();
}
基本的に、すべてのモニターでプログラムを実行できるようにしたいと考えています。ここで完全なコードを表示するには: https://gist.github.com/fletchto99/5788659