• Post Reply Bookmark Topic Watch Topic
  • New Topic

Which monitor an application is running on  RSS feed

 
john merritt
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On a PC that has two or more monitors is it possible to query which of the screens an application window is open on?
Thanks
John UK
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37465
538
Eclipse IDE Java VI Editor
 
Rob Spoor
Sheriff
Posts: 21133
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
GraphicsEnvironment -> GraphicsDevice -> GraphicsConfiguration; then call getBounds() to find the screen bounds. The Javadoc of GraphicsDevice has a small example, although using the default graphics configuration works as well as having to loop through all configurations for a GraphicsDevice.
 
john merritt
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the info
 
Rob Spoor
Sheriff
Posts: 21133
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!