import java.awt.*; import java.applet.*; public class LineArt extends Applet { public void paint(Graphics g) { //the rectangle was scaled down to fit within the view window of my computer int width = 896; int height = 576; int X = 0; int Y = 0; g.drawRect(10, 10, width, height); // Draw bottom-right corner X = 906; Y = 10; for(int i = 0; i<64; i++) { g.drawLine(906, Y, X, 586); Y = Y +9 ; X = X - 14 ; } // Draw top-right corner X=906; Y=586; for(int i = 0; i<64; i++) { g.drawLine(906, Y, X, 10); Y = Y -9 ; X = X - 14 ; } // Draw bottom-left corner X = 10; Y = 10; for(int i = 0; i<64; i++) { g.drawLine(10, Y, X, 586); Y = Y +9 ; X = X + 14 ; } // Draw top-left corner X=10; Y=586; for(int i = 0; i<64; i++) { g.drawLine(10, Y, X, 10); Y = Y -9 ; X = X + 14 ; } //inner drawing g.drawRect((10 + Math.round(width/4)), (10+ Math.round(height/4)), (int) width/2, (int)height/2); //224 width 144 height X = 682; Y = 154; for(int i = 0; i<57; i++) { g.drawLine(682, Y, X, 442); Y = Y + 5 ; X = X - 8 ; } X=682; Y=442; for(int i = 0; i<57; i++) { g.drawLine(682, Y, X, 154); Y = Y - 5 ; X = X - 8 ; } X = 234; Y = 154; for(int i = 0; i<57; i++) { g.drawLine(234, Y, X, 442); Y = Y + 5 ; X = X + 8 ; } X=234; Y=442; for(int i = 0; i<57; i++) { g.drawLine(234, Y, X, 154); Y = Y - 5 ; X = X + 8 ; } } }