+ 2
How do I get the properties of an external window which is dragged by mouse?
Hi Ho, i want to create a grid where I can drag a window into it and the window should resize to the grid, when I drop it. The problem is that I don't know how I can get the position and the size from external window and how to set it. And I do not know how to recognize that you pull a window. I thought it would work with a DropTargetListener, but it only detects files.
6 ответов
0
have you try getLocation on the jframe ?
i cant test it rn.
0
The window are not created by me. It is for example a open PDF or something else.
0
so you dont have an access to jframe object ?
0
Yeah correct.
0
you cant, you'll need the object.
0
Hm maybe I need new library to get the object from external window but I don't have experience with it. When you or someone else have an idea which library can do this would it be great.