home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 39 / IOPROG_39.ISO / SOFT / sdkjava40.exe / data1.cab / fg_Samples / Samples / International / sampleime / SampleIMETestFrame.java < prev    next >
Encoding:
Java Source  |  2000-05-04  |  1.7 KB  |  46 lines

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