4

I wrote a swing application for my clients and some of them are using multiple monitors. Unfortunately that Java Swing application is confused in environment where multiple monitors present and pop up window appear in either first or second window. How can I identify that client has multiple monitors and force application to show up consistently on one monitor?

Roman Kagan
  • 10,440
  • 26
  • 86
  • 126

1 Answers1

6
  1. To detect number of screens, use GraphicsEnvironment.getScreenDevices().
  2. To specify the monitor, either refer to this question, or the example in the GraphicsDevice API.
Community
  • 1
  • 1
Moonbeam
  • 2,283
  • 1
  • 15
  • 17