How do I get all the visible dialogs created by my java application?
It seems like "java.awt.Frame.getFrames()" didn't give me any of the dialogs, is there a "getDialogs" function?
~Zenteo
Printable View
How do I get all the visible dialogs created by my java application?
It seems like "java.awt.Frame.getFrames()" didn't give me any of the dialogs, is there a "getDialogs" function?
~Zenteo
Use Window#getWindows() and iterate over the returned array testing for instanceof Dialog (or JDialog, if this is Swing). Depending on your specific requirements, it might be desirable to first invoke System#gc() to purge the array of Windows which are no longer reachable.
But more important, why do you think you need this? There's probably a better way to do whatever it is you're doing.
db
A little problem there;
j2se doesn't have Window.getWindows() :/
I'm trying to get the size and position of a dialog in the java application, Alice, using
jython, which is integrated for scripting in Alice.
Alice is a simple programming tool
for beginners. You can create 3D games and animations with it.
Alice.org if you're intrested.
Thanks for the replys :)
Still, I get a "class 'java.awt.Window' has no attribute 'getWindows'" error from getWindow(), while
getFrame() work like a charm... :(
Ahh I see, Alice uses j2se 1.5.0.
Thanks for the help though.
Now, just tell me it's impossible or something : )