/home/ffrigin/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 painter.SPainter;
12 import shapes.SCircle;
13
14
15
16 @author
17
18 public class Target {
19
20
21
22 private void paintTheImage() {
23 SPainter klee = new SPainter("Target",700,700);
24 SCircle dot = new SCircle (300);
25 klee.setColor(Color.RED);
26 klee.paint(dot);
27 SCircle dot1 = new SCircle (200);
28 klee.setColor(Color.WHITE);
29 klee.paint(dot1);
30 SCircle dot2 = new SCircle (100);
31 klee.setColor(Color.RED);
32 klee.paint(dot2);
33
34 }
35
36
37
38 public Target() {
39 paintTheImage();
40 }
41
42 public static void main(String[] args) {
43 SwingUtilities.invokeLater(new Runnable(){
44 public void run () {
45 new Target();
46 }
47 });
48
49 }
50
51 }
52