import java.awt.*; //use all awt package
import java.applet.*; //use applet package
public class Exm1 extends Applet //declaration of class
{
public void paint(Graphics g) //paint method
{
int x; //variable x
for(x=0;x<=200;x=x+10){ //for - next
g.drawLine(x,200,0,x); //drawing line
}
}
}
Excercise 1
Create applets that draws the following figure. The interval of each line is 20 pixels.
Excercise 2
Excercise 2
Create applets that draws the following figure.