import java.awt.*;





public class mas110panel {

	public float favoriteFrame=0;

	public int w, h, mx, my, mz;
	
	public int flysize = 5000;

   	static int lastT=0, fps=0, instFps=0;

	public void init() {
	
	}

	public void draw(Graphics g, float t) {

		/* m is the the heigth times the fractional part of t */

   		int m = (int)(h * (t - (int)t));

   		/* s goes across the screen every 60 seconds */

		int s = (int)(w * ((int)t % 60)/60.0f);



		/* Compute the instaneous fps */

		if((int)t == lastT) ++instFps;

		else {

			lastT = (int)t;

			fps = instFps;

			instFps = 1;

		}



		/* Clear the buffer */

		g.setColor(Color.gray);

        g.fillRect(0,0,w,h);

        

		int bar = fps;

		while(bar > (h-15)) bar /= 2;

		

        /* Draw bar representing fps */

        g.setColor(Color.darkGray);

        g.fillRect(w/2, h-bar, w, h);

        

        /* Draw test pattern */

		g.setColor(Color.white);

		/* Draw line going up the screen */

		g.drawLine(0,m,w,m);

		/* Add one going down the screen */

		g.drawLine(0,h-m,w,h-m);

		/* Add one sweeping across the screen */

		g.setColor(Color.lightGray);

		g.drawLine(s,0,s,h);



		int loo1, loo2;

		g.setColor(Color.green);

		loo1 = (int)(mx * w);

		g.drawLine(loo1,0,loo1,h);

		loo2 = (int)(my * h);

		g.drawLine(0,loo2,w,loo2);

		g.fillOval(loo1-2, loo2-2, 5, 5);



		/* Now draw text on top */		

        g.setColor(Color.black);

        g.drawString(""+fps + " fps", w/2, h-bar-5);

		/* And add the second count in red */

		g.setColor(Color.black);

		g.drawString(""+t, 5, h-5);

	}

}
