import java.awt.*;
import java.awt.event.*;
import java.applet.*;

public class Test extends Frame
{
	public Test()
	{
		addWindowListener( new  MainWindowAdapter() );
		
	}
	public void paint( Graphics mainGraphics )
	{
		mainGraphics.drawOval( 10, 10, 50, 50 );
		
	}
	public static void main( String args[] )
	{
		Test mainWindow = new Test();

		mainWindow.setSize( new Dimension( 300, 200 ) );
		mainWindow.setTitle( "An AWT_Based Application" );
		mainWindow.setVisible( true );
	}
}
class MainWindowAdapter extends WindowAdapter
{
	public void windowClosing( WindowEvent mainWindowEvent )
	{
		System.exit( 0 );
	}
}

