import java.awt.*;
import java.math.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.io.*;
import java.util.*;
import java.awt.Panel;


public class Main extends Panel {
    ControlCanvas C;

    public static void main(String[] args) {  
        Main a=new Main();
        Frame2 F=new Frame2("Frieze!  by Rich Schwartz",a);
	a.setBackground(Color.black);
                  a.init();
	F.add(a);
	F.pack();
	F.addWindowListener(new WinList(F));
	F.setVisible(true);
    }


    public  void init() {   
	this.setSize(970,720);	
	C=new ControlCanvas();
	add(C);
	C.setSize(970,720);
    } 

    public static class Frame2 extends Frame implements ComponentListener {
        Main a;

        public Frame2(String W,Main a) {
            super(W);
            this.a=a;
            addComponentListener(this);
        }


        public void componentHidden(ComponentEvent e) {
        }
        
        public void componentMoved(ComponentEvent e) {
        }
        
        public void componentResized(ComponentEvent e) {
	    a.C.setSize(getWidth(),getHeight());
	}

        public void componentShown(ComponentEvent e) {
        }
        
    }

    
}

