I am using multiple monitors, before I open popup from main window I need to check the main window is currently active(opened) on which monitor. How can check in JavaFx.
How to identify opened window is on which monitor while using primary and secondary monitors: JavaFx
Asked
Active
Viewed 165 times
1 Answers
1
Use Screens.getScreensForRectangle
. Using the bounds of your window you should be able to get a list of the screens used to display it's area:
List<Screen> windowScreens = Screens.getScreensForRectangle(window.getX(), window.getY(),
window.getWidth(), window.getHeight());

fabian
- 80,457
- 12
- 86
- 114