home *** CD-ROM | disk | FTP | other *** search
/ Web Programming with Visual J++ / Web_Programming_with_Visual_J_SAMS.NET_Version_1.0_1997.iso / source / chap16 / ex16dframe.java < prev    next >
Encoding:
Java Source  |  1996-09-17  |  336 b   |  24 lines

  1. import java.awt.*;
  2.  
  3. class EX16DFrame extends Frame
  4. {
  5.     public EX16DFrame(String str)
  6.     {
  7.         super (str);
  8.     }
  9.  
  10.     public boolean handleEvent(Event evt)
  11.     {
  12.         switch (evt.id)
  13.         {
  14.             case Event.WINDOW_DESTROY:
  15.                 dispose();
  16.                 System.exit(0);
  17.                 return true;
  18.  
  19.             default:
  20.                 return super.handleEvent(evt);
  21.         }             
  22.     }
  23. }
  24.