How to control iconifying and closing on multiple jframes from a main frame
Hi guys I have a problem.
I have an application that open four jframes in order to perform a simulation. If the user iconify one of these frames( or the main frame) everything have to be iconified. The same have to happen for deiconifing, closing, activating ecc.
What should happen is that any frame that have to be (i.e.) iconified, iconify itself and then ask to the main window to iconify everything else.
What actually happens is that nothing is moving, only the closing action is working fine (because i use a System.exit in that case).
Is too late for me to use a jinternalframe, because i have to change too many things.
What else i have to put in the methods to force them work? Thank you in advance.
//main window
publicvoid windowActivated(WindowEvent arg0){
//all the children windows are created at the same time
if(nord!=null && !attivi){
attivi=true;//to avoid stack overflow
nord.getWindowListeners()[0].windowActivated(arg0);
sud.getWindowListeners()[0].windowActivated(arg0);
ovest.getWindowListeners()[0].windowActivated(arg0);
est.getWindowListeners()[0].windowActivated(arg0);
}
//children
publicvoid windowActivated(WindowEvent arg0){
root.getWindowListeners()[0].windowActivated(arg0);
}
I tried also dispatchEvent but is not working.

