sanjay_thakur
asked on
closing child window from a frame
hi,
I have a frame.In this frame I have a pop up menu
when the user selects "create" option from the pop up menu
I display another frame to create something
The problem is when I close the main frame I want to
dispose this second frame
How do I do this
I tried doing this
f.addWindowListener(new WindowAdapter ()
{
Window [] childWindows = null;
public void windowClosing(WindowEvent event)
{
System.out.println("in window closing event");
childWindows = f.getOwnedWindows();
System.out.println("childW
for(int i=0;i<childWindows.length;
{
System.out.println("destro
childWindows[i].setVisible
String name = childWindows[i].getName();
System.out.println("name" + name);
childWindows[i].dispose();
}
}
});
This does not work.
How do I do this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.