Saturday, August 4, 2012

Window Closing in Java AWT

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);
    }    
}



1 comment:

ShareThis