My assignment: The
top-right cell requires horizontal lines that are equidistant in the cell. Each line is 10 pixels apart. Additionally, the lines need to be colored randomly in any possible red, green and blue range.
picture example: http://i68.photobucket.com/albums/i35/stxda/example.jpg
I did the top left cell, and my coding was:
----------------
import java.awt.*;
import java.applet.*;
import java.util.*;
public class Lab06G80 extends Applet
{
public void paint(Graphics g)
{
int width = 800;
int height = 600;
g.drawRect(10,10,width,height);
{
g.drawLine(410,10,410,610);
}
{
g.drawLine(10,310,810,310);
}
for (int a = 20; a <= 400; a += 10)
{
g.drawLine(a,20,a,290);
}
}
}
-------------------------
now I need help doing the top right cell.. please help coders!!
2007-01-27
10:30:34
·
2 answers
·
asked by
Snaox
1