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?
Asked
Active
Viewed 46 times
1

Anubian Noob
- 13,426
- 6
- 53
- 75

Harry Kitchener
- 255
- 1
- 2
- 8
-
1It is a question, I've noticed SO is full of irritants like you who nit-pick all the time. Rather than nit-pick petty, little things, how about you actually try and help me? – Harry Kitchener May 17 '14 at 22:35
-
I don't know the answer, I'm trying to help you get more help out of the nitpicky people who _do_ know how to help you. – Anubian Noob May 17 '14 at 22:41
-
1But your edit was `nit-picky`, it was unnecessary. If someone were to help me, then I'm sure that removing a line regarding a thought would not make a difference. – Harry Kitchener May 17 '14 at 22:44
1 Answers
1
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!