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?
Asked
Active
Viewed 1,754 times
1 Answers
6
- To detect number of screens, use
GraphicsEnvironment.getScreenDevices()
. - To specify the monitor, either refer to this question, or the example in the
GraphicsDevice
API.