Reputation: 265
I am trying to get my application to appear on the center of the second monitor as my main monitor has the code on. I am using window.setLocationRelativeTo(null);
, but do not know what I would use to place it on the other monitor. How can I get my application to appear on the second monitor?
Upvotes: 1
Views: 46
Reputation: 3806
Using GraphicsEnvironment
and GraphicsDevice
class's seems to be the way to go for this. By obtaining the environment you can check for GraphicsDevices
such as screens and then place your frame on the relevant device if found. If you look at this question here there are several answers which should be able to provide you with what you want.
Good Luck!
Upvotes: 1