1 /* 2 * Assignment One Part Three - Making nine dots with four different sizes, four different colors, symmetrical 3 * among the Y-Axis, and not all circles touch the Y-Axis. 4 */ 5 6 package npw; 7 8 import java.awt.Color; 9 import javax.swing.SwingUtilities; 10 import painter.SPainter; 11 import shapes.SCircle; 12 13 public class Dots { 14 private void paintTheImage() { 15 // Three dots for the middle 16 SPainter klee = new SPainter("Dots",600,600); 17 SCircle ThreeDots = new SCircle(50); 18 klee.setColor(Color.BLACK); 19 klee.paint(ThreeDots); 20 klee.mfd(150); 21 klee.paint(ThreeDots); 22 klee.mbk(300); 23 klee.paint(ThreeDots); 24 klee.mfd(150); 25 26 // Two 60 Radius Dots 27 SCircle TwoLargeDots = new SCircle(60); 28 klee.setColor(Color.ORANGE); 29 klee.mrt(150); 30 klee.mfd(75); 31 klee.paint(TwoLargeDots); 32 klee.mbk(75); 33 klee.mlt(300); 34 klee.mfd(75); 35 klee.paint(TwoLargeDots); 36 klee.mbk(75); 37 klee.mrt(150); 38 39 // Two 40 Radius Dots 40 SCircle TwoMediumDots = new SCircle(40); 41 klee.setColor(Color.CYAN); 42 klee.mrt(150); 43 klee.mbk(75); 44 klee.paint(TwoMediumDots); 45 klee.mfd(75); 46 klee.mlt(300); 47 klee.mbk(75); 48 klee.paint(TwoMediumDots); 49 klee.mfd(75); 50 klee.mrt(150); 51 52 //Two 20 Radius Dots 53 SCircle TwoSmallDots = new SCircle(20); 54 klee.setColor(Color.YELLOW); 55 klee.mrt(225); 56 klee.paint(TwoSmallDots); 57 klee.mlt(450); 58 klee.paint(TwoSmallDots); 59 60 } 61 62 public Dots(){ 63 paintTheImage(); 64 } 65 66 public static void main(String[] args) { 67 SwingUtilities.invokeLater(new Runnable() { 68 @Override 69 public void run() { 70 new Dots(); 71 } 72 }); 73 } 74 }