I have two screens plugged into my computer and was wondering if there was a way in JFrame or Toolkit of detecting which screen the window is on?
I have this code:>
If you use the code shown here you can iterate over all the GraphicsDevices in the system and get their dimensions. Given that you can create a JFrame on a specific GraphicsDevice you can also fetch the specific GraphicsDevice a JFrame is on by getting the JFrame's Window, calling http://download.oracle.com/javase/6/docs/api/java/awt/Window.html#getGraphicsConfiguration() on the Window and then calling getGraphicsDevice on that.