-
Top Most Frame
Hello, i have a JFrame and i laucnh a model dialog from it,
is there a way of knowing the top most frame? i.e. somehow return the laucnhed dialog,
i need this so i can reparent further dialogs over this dialog if my program needs prompting while the dialog is up...
does this make sense?
i.e. my program exits, i put up a dialog with a progress bar that says closing down, my program then cycles though all the underlying projects that are open in the program, and saves them, but if they need a file to save to then i need to poup a dialog to ask this, however, because the shutting down dialog ist here i can't get the file chooser popup to work..
so is there a way of makeing the jfilechooser be parented to the top most frame, i.e. over the top of my shutdown dialog?
cheers
Andy
-
Frame.getFrames() -- returns an array of all frames
Then check if that frame is the active frame with isActive... then work it from there... if it is active it's either the parent of the current topmost frame or the frame itself if it doesn't have child frames. :D
-
cunning! very cunning....
marvellous, i'll give it a go later on,
cheers
-
I hope it works for you. :D