1 /* 2 * Program to paint a Target symbol in the context of the 3 * Nonrepresentational Painting World, NPW. 4 */ 5 6 package npw; 7 8 import painter.SPainter; 9 import shapes.SCircle; 10 import javax.swing.*; 11 import java.awt.*; 12 13 public class Target { 14 15 // Making a target symbol 16 private void paintTheImage() { 17 SPainter kira = new SPainter("Target Symbol", 600, 600); 18 SCircle big = new SCircle(200); 19 kira.setColor(Color.RED); 20 kira.paint(big); 21 22 SPainter kg = new SPainter("Target Symbol", 400, 400); 23 SCircle med = new SCircle(134); 24 kira.setColor(Color.WHITE); 25 kira.paint(med); 26 27 SPainter kag = new SPainter("Target Symbol", 200, 200); 28 SCircle sm = new SCircle(68); 29 kira.setColor(Color.RED); 30 kira.paint(sm); 31 } 32 33 // REQUIRED INFRASTRUCTURE 34 35 public Target() { 36 paintTheImage(); 37 } 38 39 public static void main(String[] args) { 40 SwingUtilities.invokeLater(new Runnable() { 41 public void run() { 42 new Target(); 43 } 44 }); 45 } 46 } 47 48 49 50 51 52 53