This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How many monitors do I have?  RSS feed

Eitan Levi
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a question about multiple monitors...

I know that I can use the GraphicsEnvironment class to get a list of screen devices, and from each of those GraphicsDevice objects I can get a plethora of other information.

But if I have more than one monitor, will I necessarily have more than one screen device? Or will I have a single screen device that simply has a huge desktop?

So let's say I have 3 screens each with 1024x768 resolution. When I call getScreenDevices(), will I receive a single entry that has a bounding Rectangle of size 3072x768? Or will I instead get 3 entries, each of which has a bounding rectangle of size 1024x768?

Is the result dependent on different display drivers? What about different operating systems? And if so, how can I tell whether I have one huge desktop panned across 3 monitors, or 3 smaller desktops?

Any help would be greatly appreciated.

Thanks in advance!
[ September 18, 2006: Message edited by: Eitan Levi ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!