How do I get my application to appear on the center of my second monitor, not my main?

Harry Kitchener

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?

Levenal

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!

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I get the system tray on my second monitor?

From Dev

How do I get a route in my code for my WebAPI application

From Dev

How do I get the blue location dot to appear in my Android application?

From Dev

How do I get the blue location dot to appear in my Android application?

From Dev

How do I get full resolution out of my monitor?

From Dev

How do I update my own application in the software center?

From Dev

How do I get my Dock to appear on the left in Ubuntu 20.10?

From Dev

How do I get this unicode character to appear on my website?

From Dev

How do i get my repeater results to appear line by line

From Dev

How do I get my app to appear in the Applications list?

From Dev

How do I split main.js of my Electron application?

From Dev

How do I set my external monitor as my primary with a Macbook?

From Dev

How to Mirror my first monitor onto my second monitor but with a DELAY

From Dev

How do I center an svg in my html?

From Dev

How do I center my JFrame?

From Dev

How do I center all my elements?

From Dev

How do I center my heading?

From Dev

How do I stop my second monitor from cutting off top and bottom?

From Dev

How do i get the variable defined in my boolean statement to work in my main program?

From Dev

How do I make my JFrame class my main class?

From Dev

How do I get IzPack to add my application to the Start Menu?

From Dev

How do I get the @RolesAllowed annotation to work for my Web application?

From Dev

How do I get IzPack to add my application to the Start Menu?

From Dev

How do I get path of my application's binaries?

From Dev

How can I center my main blog content?

From Dev

How can I get my ad banner to the bottom of my application?

From Dev

How do I add an image to my application

From Dev

How do I restart my pyqt application?

From Dev

How do I reserve ports for my application?

Related Related

  1. 1

    How can I get the system tray on my second monitor?

  2. 2

    How do I get a route in my code for my WebAPI application

  3. 3

    How do I get the blue location dot to appear in my Android application?

  4. 4

    How do I get the blue location dot to appear in my Android application?

  5. 5

    How do I get full resolution out of my monitor?

  6. 6

    How do I update my own application in the software center?

  7. 7

    How do I get my Dock to appear on the left in Ubuntu 20.10?

  8. 8

    How do I get this unicode character to appear on my website?

  9. 9

    How do i get my repeater results to appear line by line

  10. 10

    How do I get my app to appear in the Applications list?

  11. 11

    How do I split main.js of my Electron application?

  12. 12

    How do I set my external monitor as my primary with a Macbook?

  13. 13

    How to Mirror my first monitor onto my second monitor but with a DELAY

  14. 14

    How do I center an svg in my html?

  15. 15

    How do I center my JFrame?

  16. 16

    How do I center all my elements?

  17. 17

    How do I center my heading?

  18. 18

    How do I stop my second monitor from cutting off top and bottom?

  19. 19

    How do i get the variable defined in my boolean statement to work in my main program?

  20. 20

    How do I make my JFrame class my main class?

  21. 21

    How do I get IzPack to add my application to the Start Menu?

  22. 22

    How do I get the @RolesAllowed annotation to work for my Web application?

  23. 23

    How do I get IzPack to add my application to the Start Menu?

  24. 24

    How do I get path of my application's binaries?

  25. 25

    How can I center my main blog content?

  26. 26

    How can I get my ad banner to the bottom of my application?

  27. 27

    How do I add an image to my application

  28. 28

    How do I restart my pyqt application?

  29. 29

    How do I reserve ports for my application?

HotTag

Archive