import java.applet.Applet;
import java.awt.*;
import Point;
public class demo extends Applet 
  {
    static final int N = 1000;

    static void clear(Graphics page, Color c)
      { 
        int h = page.getClipRect().height;
        int w = page.getClipRect().width;
        page.setColor(c);
        page.fillRect(0, 0, w, h);
      }
    public void paint(Graphics page)
      {
        int alg = Integer.parseInt(getParameter("algorithm"));
        int N = Integer.parseInt(getParameter("N"));
        int delay = Integer.parseInt(getParameter("delay"));

        clear(page, Color.lightGray);
        if (alg == 1)
          {
            BST T = new BST(N, 20, 0, delay, page);
          }
        if (alg == 2)
          {
            BST T = new BST(N, 30, 1, delay, page);
          }
        if (alg == 3)
          {
            BSTdig T = new BSTdig(N, 20, 0, delay, page);
          }
        if (alg == 4)
          {
            BSTdig T = new BSTdig(N, 30, 1, delay, page);
          }
      }	    
  }

