You see a simple line in between a rectangle from 200X200 pixels.
This line is drawn in the absolute way. The code is
public class Voorbeeld2 extends java.applet.Applet { double a = 1.5,b = 200.0,y3; int t,tmax=250,yi=150,youd; public void init() { y3 = -a*t+b; youd = (int) y3; } public void paint(Graphics g) { init(); for ( t=0; t < 300 ; t = t+1) { y3 = - a * t + b; yi = (int) y3; g.drawLine(t, youd, t+1, yi); youd = yi; } } }
Enschede, 1999; updated March, 2003.