import java.awt.*; public class line4 extends java.applet.Applet { public void paint(Graphics screen) { int y1=0,y2=0,y3=0,y4=0,y5=0,y6=0; int x1=0,x2=0,x3=0,x4=0,x5=0,x6=0;; int c1=0,c2=250; x1=115+20; x2=53+20; x3=115+20; x4=226+20; x5=115+20; x6=53+20; y1=115+20; y2=1+20; y3=115+20; y4=115+20; y5=115+20; y6=226+20; screen.setColor(new Color(0,0,0));//RGB screen.drawLine(20,20,247,20);//line1 screen.drawLine(20,20,20,247);//line1 screen.drawLine(20,247,247,247);//line1 screen.drawLine(247,20,247,247);//line1 c1=96; c2=58; for (int j=0; j<20; j++) { screen.setColor(new Color(c2,c1,0));//RGB screen.drawLine(x1, y1, x2,y2);//line1 screen.drawLine(x2, y2, x3,y3);//line2 screen.drawLine(x3, y3, x4,y4);//line3 screen.drawLine(x4, y4, x5,y5);//line4 screen.drawLine(x5, y5, x6,y6);//line5 screen.drawLine(x6, y6, x1,y1);//line6 x1=x1-6; x2=x2+3; x3=x3+3; x4=x4-6; x5=x5+3; x6=x6+3; //y1 no change y2=y2+6; y3=y3-6; //y4 no change y5=y5+6; y6=y6-6; //************************************** c1=c1-4; c2=c2+8; } } }