I want to close only the current window
Hello, I have an application that calls some function to display an image in a separate window, and If I close this window, my application is closed too.
What should I type instead of System.exit(0) in the following code?
publicclass ImageFrameextends Frame
{
WindowListener listener=new WindowAdapter()
{publicvoid windowClosing(WindowEvent e)
{ System.exit(0);
}
};
[757 byte] By [
tleis1a] at [2007-10-1 2:10:56]

thank you
I used dispose(), and it worked fine.
but why I got compilation errors when I use this.dipose();
why this isn't refering to the frame?
WindowListener listener=new WindowAdapter()
{ public void windowClosing(WindowEvent e)
{ dispose();
}
};
Hi againthis time i am not using the window listener, i am using the Action Listener, and using dispose() to close the frame do not work. any solution?