How do I find the coordinates of a second monitor?

How do you make a component with the function

adToDesktop()

Appear on what ever window your main window is on?

You can call setBounds on windows as well, since they are strictly speaking Components.
To know the bounds of the screens, you can query the desktop using getDisplays()

But there is also a method in component: getParentMonitorArea()

Hope that helps

I ended up remedying this by getting the plugins coordinates and making the second window relative to plugins position! Thanks!