/home/mbilodea/NetBeansProjects/CS1/src/npw/Target.java |
1
2
3
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
14
15 @author
16
17 public class Target {
18
19
20
21 private void paintTheImage() {
22 SPainter klee = new SPainter("Target",600,600);
23 SCircle big = new SCircle(200);
24 klee.setColor(Color.RED);
25 klee.paint(big);
26 SCircle medium = new SCircle(133.3);
27 klee.setColor(Color.WHITE);
28 klee.paint(medium);
29 SCircle small = new SCircle(66.7);
30 klee.setColor(Color.RED);
31 klee.paint(small);
32 }
33
34
35
36 public Target() {
37 paintTheImage();
38 }
39
40 public static void main(String[] args) {
41 SwingUtilities.invokeLater(new Runnable(){
42 public void run() {
43 new Target();
44 }
45 });
46 }
47
48 }
49