home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1996 December
/
PCWKCD1296.iso
/
vjplusb
/
msdev
/
samples
/
microsoft
/
javabeep
/
javabeepframe.java
< prev
next >
Wrap
Text File
|
1996-07-12
|
2KB
|
45 lines
//******************************************************************************
// javabeepframe.java:
//
//******************************************************************************
import java.awt.*;
//==============================================================================
// STANDALONE APPLICATION SUPPORT
// This frame class acts as a top-level window in which the applet appears
// when it's run as a standalone application.
//==============================================================================
class javabeepframe extends Frame
{
// javabeepframe constructor
//--------------------------------------------------------------------------
public javabeepframe(String str)
{
// TODO: Add additional construction code here
super (str);
}
// The handleEvent() method receives all events generated within the frame
// window. You can use this method to respond to window events. To respond
// to events generated by menus, buttons, etc. or other controls in the
// frame window but not managed by the applet, override the window's
// action() method.
//--------------------------------------------------------------------------
public boolean handleEvent(Event evt)
{
switch (evt.id)
{
// Application shutdown (e.g. user chooses Close from the system menu).
//------------------------------------------------------------------
case Event.WINDOW_DESTROY:
// TODO: Place additional clean up code here
dispose();
System.exit(0);
return true;
default:
return super.handleEvent(evt);
}
}
}