swing - Close all Java child windows -
in java swing there way find , close jdialog objects being displayed?
i have large application , there multiple parts can call display dialog 1 single point want able detect , close it.
keep reference each of dialogs (perhaps in collection). when needed, iterate collection , call dialog.setvisible(false).
as suggested @mkorbel, can use:
window[] windows = window.getwindows(); you'd need check 'parent' window when iterating array , closing things.
Comments
Post a Comment