How to get position data of external screen
<p>I want my java application to start in a specific screen (assume there will be multiple screens connected to the computer). The problem is that I can't seem to get the position data of the external screen. </p>

<p>I have one hack that gets the data:</p>

<pre><code>    GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()[1]; //Gets the external screen.
    gd.setFullScreenWindow(someWindow); //Sets some window fullscreen. This line has to be here or you get a null-pointer in the next line.
    Point location = gd.getFullScreenWindow().getLocation();
</code></pre>

<p>Is there a better way to get this information?
I don't want to make a window go inn and out of fullscreen just to get the position data of the device.</p>
