I do have main application JFrame window which can include different components. I open a self implemented OnScreenKeyboard when the user select a editable textfield. The OSK is also a JFrame window.
When the user drag the main window to another monitor, the OSK should also be shown on the same monitor. For this i have to detect the monitor the main JFrame is shown.
I try to find a method in
Toolkit.getDefaultToolkit()
but was not able to find someting.
Do you know how i can detect the monitor where a JFrame is shown?
Java-Version 1.4 Windows XP
Thanks
Answer, if the solution of all available monitors are the same.
For AWT:
Every Control does have the method getMonitor() from which the screen position get can calculated from like:
For SWT:
It is just a snip at my origial code. you should ask if return values are not null ans something like this!