summaryrefslogtreecommitdiffstats
path: root/voronoi/CompGeom.java
blob: 93dcafa3f9cf5c3261a0246aa40687e0ec415dff (plain) (blame)
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
package voronoi;
import java.applet.Applet;
import java.awt.Button;
import java.awt.Color;
import java.awt.Event;
import java.awt.FlowLayout;

public class CompGeom extends Applet {
	private static final long serialVersionUID = 1L;

	private Button start;

	private CompGeomTest test;

	private int w, h;

	public void init() {
		start = new Button("Voronoi/Delaunay Applet...");
		w = 900;
		h = 550;
		setLayout(new FlowLayout(FlowLayout.CENTER));
		setBackground(Color.lightGray);
		add(start);
	}

	public boolean action(Event e, Object o) {
		if (e.target == start) {
			test = new CompGeomTest(this);
			test.setSize(w, h);
			test.setResizable(false);
			test.setVisible(true);
		}
		return true;
	}
}