FileDocCategorySizeDatePackage
Interface.javaAPI DocExample1183Sun Nov 25 12:36:20 GMT 2001myprojects.Interface

Interface

public class Interface extends Frame

Fields Summary
Constructors Summary
public Interface()

		addWindowListener(new WindowAdapter() {
			public void windowClosing(WindowEvent e) {
				dispose();
				System.exit(0);
			}
		});
	
Methods Summary
public static voidmain(java.lang.String[] args)

		System.out.println("Starting Interface...");
		Interface mainFrame = new Interface();
		mainFrame.setSize(400, 400);
		mainFrame.setTitle("Interface");
		mainFrame.setVisible(true);
		Shape c = new Circle(10.0);
		System.out.println("Area of the circle is "+c.area());
		System.out.println("Perimeter of the circle is "+c.perimeter());
		Shape t = new Triangle(10.0, 10.0);
		System.out.println("Area of the Triangle is "+t.area());
		System.out.println("Perimeter of the triangle is "+t.perimeter());