home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Sample.bin
/
MainFrame.java
< prev
next >
Wrap
Text File
|
1997-09-06
|
1KB
|
44 lines
/*
* MainFrame.java
*
* class MainFrame provides a placeholder for applet
* Applet1 to be run in an application.
*/
package samples.conversion;
import java.awt.*;
import java.awt.event.*;
class MainFrame extends Frame
{
public MainFrame( String title )
{
super( title );
enableEvents( AWTEvent.WINDOW_EVENT_MASK );
}
public void processWindowEvent( WindowEvent e )
{
if( e.getID() == WindowEvent.WINDOW_CLOSING )
{
setVisible( false );
dispose();
System.exit( 0 );
}
super.processWindowEvent( e );
}
public static void main( String args[] )
{
Applet1 applet = new Applet1();
MainFrame window = new MainFrame( "Scrolling Text" );
window.setSize( 370, 480 );
window.setLocation( 100, 100 );
window.add( applet );
window.addNotify();
applet.init();
window.show();
applet.start();
}
}