import java.awt.*;
import java.lang.*;
import java.util.*;
import java.applet.Applet;


public class Doppler2 extends Applet
{
	public static int x = 0;
	Thread loopthread;
	int Ospeed,Wspeed,PulseTime;
	public void init()
	{
		this.setLayout(new BorderLayout());
		this.resize(1000,400);
		this.layout();
		this.show();
		this.showStatus("Partial Init Complete");
		this.show();
		this.Ospeed = 100;
		this.Wspeed = 100;
		this.PulseTime = 10;
		this.showStatus("Total Init Complete");

		
	}
	public void start()
	{
		this.showStatus("Starting Doppler");
		TW testwindow = new TW("Doppler",this.Ospeed,this.Wspeed,this.PulseTime);
		this.add("Center",testwindow);
		this.layout();
		this.show();
		testwindow.start();
		this.repaint();
		this.showStatus("Setup Complete, Begining Loop");
		//-----------------------------------threadstuff
		ThreadGroup root,current;
		current = Thread.currentThread().getThreadGroup();
		//--------------------------------------*end
		loopthread = new LoopThread(testwindow,current);
		loopthread.setPriority(5);
		loopthread.start();
		this.showStatus("Thread SpinOff Complete");		
	}
	public static void main(String args[])
	{
		Thread loopthread;
		Frame2 f = new Frame2("test");
		f.setLayout(new BorderLayout());
		TW testwindow = new TW("Doppler",100,100,10);
		f.add("Center",testwindow);
		f.resize(1000,400);
		f.show();
		System.out.println("Starting window");
		testwindow.start();
		System.out.println("igniting thread");
		//-----------------------------------threadstuff
		ThreadGroup root,current;
		current = Thread.currentThread().getThreadGroup();
		//--------------------------------------*end
		loopthread = new LoopThread(testwindow,current);
		loopthread.setPriority(5);
		System.out.println("thread inited");
		loopthread.start();
		while(f.x == 0);
		f.dispose();
		System.exit(0);

	}


}















