/home/akc/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",800,800);
23 SCircle bigdot = new SCircle(300);
24 klee.setColor(Color.RED);
25 klee.paint(bigdot);
26 SCircle dot = new SCircle(200);
27 klee.setColor(Color.WHITE);
28 klee.paint(dot);
29 SCircle smalldot = new SCircle(100);
30 klee.setColor(Color.RED);
31 klee.paint(smalldot);
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
50