Dots.java
package npw;

import java.awt.Color;
import javax.swing.SwingUtilities;
import painter.SPainter;
import shapes.SCircle;

public class Dots {

    private void paintingCode() {
        SPainter painter = new SPainter("Dots", 1000, 1000);
        SCircle dot = new SCircle(75);
        paintYellowDot (painter,dot);
        paintRedDot (painter,dot);
        SCircle circle = new SCircle(30);
        paintBluecircle (painter,circle);
        SCircle circle1 = new SCircle(80);
        paintGraycircle1 (painter,circle1);
        SCircle circle2 = new SCircle(40);
        paintGreencircle2 (painter,circle2);
        SCircle circle3 = new SCircle(50);
        paintBlackcircle3 (painter,circle3);
        SCircle circle4 = new SCircle(20);
        paintWhitecircle4 (painter,circle4);
        SCircle circle5 = new SCircle(60);
        paintPinkcircle5 (painter,circle5);
        SCircle circle6 = new SCircle(45);
        paintcircle6 (painter,circle6);
        SCircle circle7 = new SCircle(45);
        paintcircle7 (painter,circle7);
        SCircle circle8 = new SCircle(45);
        paintcircle8 (painter,circle8);
        SCircle circle9 = new SCircle(45);
        paintcircle9 (painter,circle9);

    }

    private void paintcircle9(SPainter painter, SCircle circle9) {
        painter.setColor(Color.CYAN);
        painter.paint(circle9);
    }

    private void paintcircle8(SPainter painter, SCircle circle8) {
        painter.setColor(Color.lightGray);
        painter.paint(circle8);
    }

    private void paintcircle7(SPainter painter, SCircle circle7) {
        painter.setColor(Color.GREEN);
        painter.paint(circle7);
        painter.moveWithinNeighborhood(34);
    }

    private void paintcircle6(SPainter painter, SCircle circle6) {
        painter.setColor(Color.DARK_GRAY);
        painter.paint(circle6);
    }

    public Dots(){
        paintingCode();
    }

    public static void main (String[] args) {
        SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {
                new Dots();
            }
        });
    }

    private void paintPinkcircle5(SPainter painter, SCircle circle5) {
        painter.setColor(Color.PINK);
        painter.paint(circle5);
    }

    private void paintWhitecircle4(SPainter painter, SCircle circle4) {
        painter.setColor(Color.RED);
        painter.moveWithinNeighborhood(30);
        painter.paint(circle4);
        painter.moveWithinNeighborhood(30);
    }

    private void paintBlackcircle3(SPainter painter, SCircle circle3) {
        painter.setColor(Color.BLACK);
        painter.moveWithinNeighborhood(250);
        painter.paint (circle3);
        painter.moveWithinNeighborhood(250);
    }

    private void paintGreencircle2(SPainter painter, SCircle circle2) {
        painter.setColor(Color.GREEN);
        painter.moveWithinNeighborhood(350);
        painter.paint(circle2);
        painter.moveWithinNeighborhood(350);
    }

    private void paintGraycircle1(SPainter painter, SCircle circle1) {
        painter.setColor(Color.GRAY);
        painter.moveWithinNeighborhood(60);
        painter.paint(circle1);
        painter.moveWithinNeighborhood(60);

    }

    private void paintBluecircle (SPainter painter, SCircle circle) {
        painter.setColor(Color.BLUE);
        painter.moveWithinNeighborhood(100);
        painter.paint(circle);
        painter.moveWithinNeighborhood(100);
    }

    private void paintRedDot(SPainter painter, SCircle dot) {
        painter.setColor(Color.RED);
        painter.moveWithinNeighborhood(150);
        painter.paint(dot);
        painter.moveWithinNeighborhood(150);

    }

    private void paintYellowDot(SPainter painter, SCircle dot) {
        painter.setColor(Color.YELLOW);
        painter.moveWithinNeighborhood(200);
        painter.paint(dot);
        painter.moveWithinNeighborhood(200);

    }
}