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;
    PopupPictureCanvas PP;
    PopupSelectCanvas PS;
    Manager M;

    public static void main(String[] args) {  
        Main a=new Main();
        Frame F=new Frame();
	a.setBackground(Color.black);
        a.init();
	F.add(a);
	F.pack();
	F.addWindowListener(new WinList(F));
	F.setVisible(true);
    }


    public void init() {  
	C=new ControlCanvas();
	C.setSize(400,220);
	add(C);
	PP=new PopupPictureCanvas();
	PS=new PopupSelectCanvas();
	M=new Manager();
	M.P=PP.P;
	M.S=PS.S;
	M.C=C;
        C.M=M;
	PP.P.M=M;
	PS.S.M=M;
	C.POP=new PopupManager(M,300,70);
    } 
}

