-
Notifications
You must be signed in to change notification settings - Fork 0
/
JavaShape.java
48 lines (36 loc) · 1.02 KB
/
JavaShape.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//Filename: JavaShape.java
//Main File for Java Shapes Project
//Jason LaHatte
//12/8/2018
//
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
public class JavaShape {
public static void main(String args[]) {
System.out.println("Welcome to Java Shape");
DrawingCanvas dc = new DrawingCanvas();
dc.createDrawing();
dc.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent we) {
System.exit(0);
}
});
dc.setTitle("Little People!");
dc.setBackground(new Color(30, 136, 45));
dc.setSize(dc.MAX_WIDTH, dc.MAX_HEIGHT);
dc.setVisible(true);
}
}
/*
MyPoint p1 = new MyPoint();
MyPoint p2 = new MyPoint(3.0, 1.0);
MyColor c1 = new MyColor();
c1.r(30);
MyShape shape = new MyEllipse();
//shape.setRadius(3.2);
System.out.println(shape.calcArea());
/*System.out.print("Value is: ");
System.out.print(MyPoint.calcDistance(p1, p2));
System.out.print(c1.r());
System.out.println(".");*/