Re: Get how many monitors are connected.
I would like to get the same order Windows uses. Thanks Davide Il 03/09/2021 23:51, John Hendrikx ha scritto: In what order would you want them? Windows itself isn't all that reliable either -- it will randomly reorder my screens sometimes when resuming from sleep depending on how quickly all the monitors respond. Currently my primary monitor is screen 2 according to Windows. Using the bounds you can determine however what is the left/right most screen and which screens go in between. --John On 03/09/2021 16:58, Davide Perini wrote: mmm... I confirm that it isn't really reliable. I have noticed the Screen.getScreens() have primary screen as the first element, but other screens are just in a non correct order. Hope that JavaFX will find a way to overcome this problem. Thank you Davide Il 03/09/2021 16:39, Kevin Rushforth ha scritto: I don't think so. You can find out the primary monitor with Screen.getPrimary(), and you can determine the positioning of all screens relative to each other using the visual bounds of each screen. There isn't any guarantee, though, that the list of screens is ordered, so if there are more than 2 screens, I don't know of a reliable way to distinguish the second, third, and so on. -- Kevin On 9/3/2021 7:06 AM, Davide Perini wrote: Hi, I'm using this to get how many monitors is connected to the PC: for (Screen screen : Screen.getScreens()) { } Is there a way to know what is the first, second and third monitor? Using Windows and I would like to see what is the first monitor set in windows, what's the second and so on. Is this possible using JavaFX? Thanks Davide
Re: Get how many monitors are connected.
In what order would you want them? Windows itself isn't all that reliable either -- it will randomly reorder my screens sometimes when resuming from sleep depending on how quickly all the monitors respond. Currently my primary monitor is screen 2 according to Windows. Using the bounds you can determine however what is the left/right most screen and which screens go in between. --John On 03/09/2021 16:58, Davide Perini wrote: mmm... I confirm that it isn't really reliable. I have noticed the Screen.getScreens() have primary screen as the first element, but other screens are just in a non correct order. Hope that JavaFX will find a way to overcome this problem. Thank you Davide Il 03/09/2021 16:39, Kevin Rushforth ha scritto: I don't think so. You can find out the primary monitor with Screen.getPrimary(), and you can determine the positioning of all screens relative to each other using the visual bounds of each screen. There isn't any guarantee, though, that the list of screens is ordered, so if there are more than 2 screens, I don't know of a reliable way to distinguish the second, third, and so on. -- Kevin On 9/3/2021 7:06 AM, Davide Perini wrote: Hi, I'm using this to get how many monitors is connected to the PC: for (Screen screen : Screen.getScreens()) { } Is there a way to know what is the first, second and third monitor? Using Windows and I would like to see what is the first monitor set in windows, what's the second and so on. Is this possible using JavaFX? Thanks Davide
Re: Get how many monitors are connected.
mmm... I confirm that it isn't really reliable. I have noticed the Screen.getScreens() have primary screen as the first element, but other screens are just in a non correct order. Hope that JavaFX will find a way to overcome this problem. Thank you Davide Il 03/09/2021 16:39, Kevin Rushforth ha scritto: I don't think so. You can find out the primary monitor with Screen.getPrimary(), and you can determine the positioning of all screens relative to each other using the visual bounds of each screen. There isn't any guarantee, though, that the list of screens is ordered, so if there are more than 2 screens, I don't know of a reliable way to distinguish the second, third, and so on. -- Kevin On 9/3/2021 7:06 AM, Davide Perini wrote: Hi, I'm using this to get how many monitors is connected to the PC: for (Screen screen : Screen.getScreens()) { } Is there a way to know what is the first, second and third monitor? Using Windows and I would like to see what is the first monitor set in windows, what's the second and so on. Is this possible using JavaFX? Thanks Davide
Re: Get how many monitors are connected.
I don't think so. You can find out the primary monitor with Screen.getPrimary(), and you can determine the positioning of all screens relative to each other using the visual bounds of each screen. There isn't any guarantee, though, that the list of screens is ordered, so if there are more than 2 screens, I don't know of a reliable way to distinguish the second, third, and so on. -- Kevin On 9/3/2021 7:06 AM, Davide Perini wrote: Hi, I'm using this to get how many monitors is connected to the PC: for (Screen screen : Screen.getScreens()) { } Is there a way to know what is the first, second and third monitor? Using Windows and I would like to see what is the first monitor set in windows, what's the second and so on. Is this possible using JavaFX? Thanks Davide
Get how many monitors are connected.
Hi, I'm using this to get how many monitors is connected to the PC: for (Screen screen : Screen.getScreens()) { } Is there a way to know what is the first, second and third monitor? Using Windows and I would like to see what is the first monitor set in windows, what's the second and so on. Is this possible using JavaFX? Thanks Davide