import java.awt.*; import java.util.*; public class SimpleFigure { public static void main (String [] args ) { DrawingPanel panel = new DrawingPanel(350, 700); Graphics pen = panel.getGraphics (); panel.setBackground (Color.CYAN); pen.setColor (Color.lightGray); pen.fillRect (65, 220, 220, 490); int [] xPoints = {100, 175, 250}; int [] yPoints = {150, 50, 150}; pen.fillPolygon (xPoints,yPoints, 3 ); pen.fillRect(165, 45, 20, 20); pen.setColor (Color.GRAY); pen.fillOval (105, 135, 140, 40); pen.setColor (Color.darkGray); pen.fillRect (100, 150, 150, 550); pen.setColor (Color.BLACK); for (int i = 1; i <= 55; i++) { pen.drawLine (100, 10*i + 150, 250, 10*i + 150); } for (int j = 1; j <= 15; j++) { pen.drawLine (10*j + 100, 150, 10*j + 100, 700); } } }