From a kind of backoffice application that plugs into a running JVM I want to list all open dialogs, anyone know how to fetch all the open dialogs?
No; java.awt.Frame.getFrames() does not return dialogs..
Any pointers appreciated.
Sorry for the postings, but I just got a lot of stacktraces when posting...
Message was edited by: mgrev
> Sorry for the postings, but I just got a lot of
> stacktraces when posting...
No problem, sorry to hear you had trouble. :)
I've removed all of the empty posts.
You can also use Frame.getRootFrame() to get the frame used for dialogs with a null owner frame.
Use Frame.getFrames() and for every one of those window.getOwnedWindows().
I use this code to close all open dialogs when there is an automatic logoff in my app. Don't know if it is bullet proof, but it will at least take you part of the way.
> Use Frame.getFrames() and for every one of those window.getOwnedWindows().
I would also suggest to call getOwnedWindows() for all windows you get this way.
Thanx; works like a charm :)
I can now use a bash-like-shell to walk through my frames/dialogs and components.
I love that while debugging :)
Message was edited -- fixed typo
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.