edit Never compare a boolean to true or false, it's redundant.Always assuming that's what needs to be tested.
edit2 If your purpose is to purge the previously opened but no longer reachable Frames so that they are not returned in the array from Frame.getFrames(), call System.gc();. That this does in fact run the GC on all Sun JVMs is an implementation detail, so it shouldn't be relied on.
What is your exact requirement?
There are no new questions, but there may be new answers.
Joined: Sep 27, 2010
thankyou very much for reply and code correction..
my exact requirement was that what you expected..
i want to purge the previously opened but no longer reachable Frames..
in our application i'm adding a glassPane to the top most window which shows a progressbar when the server hit was done..
for that i'm getting the child windows using frame.getOwnedWindows(), and checking which one was focused..
so every time frame.getOwnedWindows() was returning all the windows including no longer reachable windows...
thats the reason i want to purge no longer reachable windows.