CurvedSpace Forums: line project - CurvedSpace Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • {lang:pm_locked} This topic is locked

line project

#1 {lang:macro__useroffline}   Jake {lang:icon}

  • Senior Member
  • Icon
  • {lang:view_blog}
  • Group: Moderator
  • Posts: 4,637
  • Joined: 24-October 04

Posted 07 February 2006 - 09:57 PM

since i cant send myself files i guess i gotta give in and do this... *sigh*

//lines project
import java.awt.*;
import java.applet.*;


public class lines extends Applet
{
public void paint(Graphics g)
{
int width = 980;
int height = 630;
g.drawRect(10,10,width,height);

// bottom-right corner
int x1 = 990;
int y1 = 10;
int x2 = 990;
int y2 = 640;



for( int k = 0 ; k <=50 ; k++ )
{
for (long delay = 1; delay < 1000000; delay++);
g.drawLine(x1,y1,x2,y2);
y1+=height / 50 ;
x2-=width / 50 ;

}
//bottom-left corner

x1 = 10;
y1 = 10;
x2 = 10;
y2 = 640;

for( int k = 0 ; k <=50 ; k++ )
{
for (long delay = 1; delay < 1000000; delay++);
g.drawLine(x1,y1,x2,y2);
y1+=height / 50 ;
x2+=width / 50 ;

}
// top-right corner
x1 = 10;
y1 = 10;
x2 = 990;
y2 = 10;

for( int k = 0 ; k <=50 ; k++ )
{
for (long delay = 1; delay < 10000000; delay++);
g.drawLine(x1,y1,x2,y2);
y2+=height / 50 ;
x1+=width / 50 ;

}

// top-left corner

x1 = 10;
y1 = 640;
x2 = 10;
y2 = 10;

for( int k = 0 ; k <=50 ; k++ )
{
for (long delay = 1; delay < 1000000; delay++);
g.drawLine(x1,y1,x2,y2);
y1-=height / 50 ;
x2+=width / 50 ;

}

for( int k = 0 ; k <=50 ; k++ )
{
for (long delay = 1; delay < 1000000; delay++);
g.drawLine(x1,y1,x2,y2);
y1-=height / 50 ;
x2+=width / 50 ;

}

}
}

0

Page 1 of 1
  • You cannot start a new topic
  • {lang:pm_locked} This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users