home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / Java++ / VJ / SAMPLES / MICROSOFT / DAOSAMPLE / SIMPLEDAOFRAME.JAVA < prev   
Encoding:
Java Source  |  1996-11-11  |  1.6 KB  |  45 lines

  1. //******************************************************************************
  2. // simpledaoFrame.java:    
  3. //
  4. //******************************************************************************
  5. import java.awt.*;
  6.  
  7. //==============================================================================
  8. // STANDALONE APPLICATION SUPPORT
  9. //     This frame class acts as a top-level window in which the applet appears
  10. // when it's run as a standalone application.
  11. //==============================================================================
  12. class simpledaoframe extends Frame
  13. {
  14.     // simpledaoFrame constructor
  15.     //--------------------------------------------------------------------------
  16.     public simpledaoframe(String str)
  17.     {
  18.         // TODO: Add additional construction code here
  19.         super (str);
  20.     }
  21.  
  22.     // The handleEvent() method receives all events generated within the frame
  23.     // window. You can use this method to respond to window events. To respond
  24.     // to events generated by menus, buttons, etc. or other controls in the
  25.     // frame window but not managed by the applet, override the window's
  26.     // action() method.
  27.     //--------------------------------------------------------------------------
  28.     public boolean handleEvent(Event evt)
  29.     {
  30.         switch (evt.id)
  31.         {
  32.             // Application shutdown (e.g. user chooses Close from the system menu).
  33.             //------------------------------------------------------------------
  34.             case Event.WINDOW_DESTROY:
  35.                 // TODO: Place additional clean up code here
  36.                 dispose();
  37.                 System.exit(0);
  38.                 return true;
  39.  
  40.             default:
  41.                 return super.handleEvent(evt);
  42.         }             
  43.     }
  44. }
  45.