FileDocCategorySizeDatePackage
ArcTest.javaAPI DocSun JDK 1.4.2 Example5114Thu May 12 00:35:28 BST 2005None

ArcTest

public class ArcTest extends Applet
An interactive test of the Graphics.drawArc and Graphics.fillArc routines. Can be run either as a standalone application by typing "java ArcTest" or as an applet in the AppletViewer.

Fields Summary
ArcControls
controls
ArcCanvas
canvas
Constructors Summary
Methods Summary
public voiddestroy()

        remove(controls);
        remove(canvas);
    
public java.lang.StringgetAppletInfo()

        return "An interactive test of the Graphics.drawArc and \nGraphics.fillArc routines. Can be run \neither as a standalone application by typing 'java ArcTest' \nor as an applet in the AppletViewer.";
    
public voidinit()

	setLayout(new BorderLayout());
	canvas = new ArcCanvas();
	add("Center", canvas);
	add("South", controls = new ArcControls(canvas));
    
public static voidmain(java.lang.String[] args)

	Frame f = new Frame("ArcTest");
	ArcTest	arcTest = new ArcTest();

	arcTest.init();
	arcTest.start();

	f.add("Center", arcTest);
	f.setSize(300, 300);
	f.show();
    
public voidprocessEvent(java.awt.AWTEvent e)

        if (e.getID() == Event.WINDOW_DESTROY) {
            System.exit(0);
        }
    
public voidstart()

	controls.setEnabled(true);
    
public voidstop()

	controls.setEnabled(false);