I wish to determine the screen resolution where my java application is currently showing.
For example, lets say a user has my java application on his second monitor and the two monitors have the specifications of: primary 1024x1280 (Portrait rotation), secondary 1280x1024 (Landscape rotation).
I want to make the height of my popup JList fit within a comfortable margin of the second monitor. I won't get the correct results from Toolkit#getDefaultToolkit()#getScreenSize() as this would give me the dimensions from the primary monitor.
I could get the size of all the monitors by using GraphicsEnvironment#getScreenDevices() but how do I figure out which of these devices my JFrame is running within?
Thanks for your time.
-Dennis