1 package npw; 2 import java.awt.Color; 3 import javax.swing.SwingUtilities; 4 import painter.SPainter; 5 import shapes.SCircle; 6 public class Target { 7 private void paintTheImage() 8 { 9 10 SPainter big= new SPainter("Target",800,800); 11 SCircle Red= new SCircle(300); 12 SCircle White=new SCircle(200); 13 SCircle small=new SCircle(100); 14 15 big.setColor(Color.RED); 16 big.paint(Red); 17 big.setColor(Color.WHITE); 18 big.paint(White); 19 big.setColor(Color.RED); 20 big.paint(small); 21 } 22 public Target() 23 { 24 paintTheImage(); 25 } 26 public static void main(String[] args) 27 { 28 SwingUtilities.invokeLater(new Runnable() { 29 public void run() { 30 new Target(); 31 } 32 }); 33 } 34 } 35