Working of close button of Awt window
/*
* MakeCodeEasy :- Rahul Jain
*/
import java.awt.*;
import java.awt.event.*;
public class WindowCloser extends WindowAdapter
{
public void windowClosing(WindowEvent e)
{
Window w=e.getWindow();
w.setVisible(false);
w.dispose(); //release the memory
System.exit(1);
}
}
/*
* MakeCodeEasy :- Rahul Jain
*/
import java.awt.*;
import java.awt.event.*;
public class WindowCloser extends WindowAdapter
{
public void windowClosing(WindowEvent e)
{
Window w=e.getWindow();
w.setVisible(false);
w.dispose(); //release the memory
System.exit(1);
}
}
great
ReplyDelete