home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 November
/
Chip_1998-11_cd.bin
/
tema
/
Cafe
/
PDESAMPL.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();
}
}