import curve.*;
import java.awt.*;

public class Parametric extends java.applet.Applet {
  DrawCurve drawCurve;
  ParametricCurve parametricCurve,parametricExerciseCurve;
  ExercisePanel exercisePanel;
  AnimatePanel animatePanel;

  public void init()
  {
    Panel diagramPanel=new Panel(new BorderLayout(0,0));
		Panel controlPanel=new Panel(new BorderLayout(0,0));
   
    setLayout(new BorderLayout(0,0));
		setSize(800,400);

  	drawCurve=new DrawCurve();
    parametricCurve=new ParametricCurve(drawCurve);
    parametricCurve.setColor(Color.blue);
    parametricCurve.setMarker(0,0,0);
    parametricCurve.setMarker(1,1,1);
    parametricCurve.setMarker(2,2,1);
    
    parametricExerciseCurve=new ParametricCurve(null);
    exercisePanel=new ExercisePanel(drawCurve,parametricExerciseCurve);
    exercisePanel.setColor(Color.red);
    
    animatePanel=new AnimatePanel(drawCurve,false);

    controlPanel.add("South",exercisePanel);
    controlPanel.add("Center",parametricCurve);
    add("East",controlPanel);
    
    diagramPanel.add("South",animatePanel);
  	diagramPanel.add("Center",drawCurve);
    add("Center",diagramPanel);
        //Set size
//    Dimension d=parametricCurve.getSize();
//    d.width=200;
//    parametricCurve.setSize(d);
	}

}