Invention2.java
1    package NPW;
2    
3    import painter.SPainter;
4       import shapes.SCircle;
5       import shapes.SRectangle;
6       import shapes.SSquare;
7        import javax.swing.*;
8        import java.awt.*;
9    
10              public class Invention2 {
11              private void paintTheImage() {
12                  int int1 = 1;
13                  int int2 = 1;
14                          SPainter yeet = new SPainter("Invention", 600, 600);
15                          SRectangle rec;
16   
17                  rec = new SRectangle(int1*40,int1*15);
18                  // Responsible for orange ones
19                  if (int1 == int2) {
20                      yeet.setColor(Color.BLACK);
21                      yeet.moveToCenter();
22                      yeet.paint(rec);
23                  }
24                          while (int1 > -20) {
25                              int1 = int1 - 2;
26                              yeet.setColor(Color.orange);
27                              yeet.moveToCenter();
28                                  yeet.move();
29                                  yeet.paint(rec);
30                              }
31                          while (int2 > -20) {
32                              int2 = int2 - 4;
33                              yeet.moveToCenter();
34                              yeet.mlt(200);
35                              yeet.setColor(Color.BLUE);
36                                  yeet.move();
37                                  yeet.paint(rec);
38   
39                              }
40   
41              }
42              public Invention2() { paintTheImage();
43                      }
44   
45                      public static void main(String[] args) {
46                          SwingUtilities.invokeLater(new Runnable() {
47                      public void run () {
48                                          new NPW.Invention2() ;
49                                      }
50                  });
51   
52                      }
53          }