-
September 27th, 2012, 05:13 PM
#1
Need help with java applet
Hi everyone! i need some help with a lab for my computer science class
so far i have
import java.awt.*;
import java.applet.*;
public class GraphicsLab02st extends Applet
{
public void paint(Graphics g)
{
int width = 980;
int height = 630;
int x1 = 10;
int y1 = 640;
int x2 = 990;
int y2 = 640;
g.drawRect(10,10,width,height);
for (x1 = 10; x1<= 980; x1 += 20)
{
g.drawLine( x1,y1,x2,y2);
y2 -= 10;
}
i have to make this shape in all four corners and i cant figure out how, ill attach an image of what its supposed to look like.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|