When I click on the close(X) button of one frame it closes all the open Frames.
I have used following code for closing the frame
Frame f2 = new Frame();
f2.setVisible(true);
f2.setLayout(null);
f2.setSize(500,500);
f2.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent w)
{
System.exit(0);
}
});
System.exit(0)
make the whole application to close.
How can i close only one Frame??