I need to detect which display is used for running a Java application. Possible options are:
- Desktop with monitor
- Laptop with monitor
- Laptop with internal display
The application's behaviour depends on the display type: For the first two options (both monitor) it's same, for the third option the behaviour is different.
At first I used the screen resolution to detect the display type as the valid settings are known and limited (height >1000px: monitor); however, now I have to handle laptops with the same internal screen resolution as the monitor.
The application only runs on Windows XP and Windows 7 which might make it easier; however, I didn't find any solution yet. Do you know of any way to resolve this problem? Best would be with Java only of course, but if that's not possible any other way that can be used from a Java application will help. The only limitation is that I can't install new software and when using external libraries I'm limited to those which are free for commercial use.
This question was marked as a duplicate of another question regarding screen detection but isn't. So just to clarify again: This question is NOT about using several displays at the same time. This question is just about using one display and detecting what kind of display it is (which might work by knowing the dpi or alternatively some identifier that tells me whether it's an integrated or external display - but to my knowledge non of them is available (dpi is available but only from a system setting that defaults to 96 and is unreliable)).