Dots.java
1    package npw;
2    
3    import painter.SPainter;
4    import shapes.SCircle;
5    
6    import javax.swing.*;
7    import java.awt.*;
8    
9    public class Dots {
10   
11       private void paintTheImage() {
12           SPainter bubblegum = new SPainter("Dots",600,600);
13           SCircle dot1 = new SCircle(50);
14           SCircle dot2 = new SCircle(75);
15           SCircle dot3 = new SCircle(25);
16           bubblegum.setColor(Color.MAGENTA);
17           bubblegum.paint(dot1);
18           bubblegum.mfd(200);
19           bubblegum.mlt(100);
20           bubblegum.paint(dot1);
21           bubblegum.mrt(200);
22           bubblegum.paint(dot1);
23           bubblegum.moveToCenter();
24           bubblegum.setColor(Color.GREEN);
25           bubblegum.mrt(200);
26           bubblegum.paint(dot2);
27           bubblegum.mlt(400);
28           bubblegum.paint(dot2);
29           bubblegum.moveToCenter();
30           bubblegum.mbk(150);
31           bubblegum.paint(dot2);
32           bubblegum.moveToCenter();
33           bubblegum.setColor(Color.CYAN);
34           bubblegum.mfd(80);
35           bubblegum.paint(dot3);
36           bubblegum.mfd(80);
37           bubblegum.paint(dot3);
38           bubblegum.mfd(80);
39           bubblegum.paint(dot3);
40       }
41   
42   
43   
44       public Dots() {
45           paintTheImage();
46       }
47   
48       public static void main(String[] args) {
49           SwingUtilities.invokeLater(new Runnable() {
50               public void run() {
51                   new Dots();
52               }
53           });
54       }
55   }