]> www.dxcluster.org Git - spider.git/blob - spider-web/beam.java
change max R from 300 to 500
[spider.git] / spider-web / beam.java
1 import java.awt.*;
2
3 public class beam extends Dialog 
4 {
5         public beam(spiderframe parent, String Prefix, Font font) {
6                 super(parent, "Call/Prefix/Other", true);
7                 this.parent = parent;
8                 this.setFont(font);
9                 
10                 Panel p1 = new Panel();
11                 p1.setLayout(new GridLayout(2,2));
12                 p1.add(new Label("Enter Your Choice (Call/Prefix/Other) "));
13                 p1.add(prefix = new TextField(Prefix, 6));
14                 add("Center", p1);
15                 
16                 Panel p2 = new Panel();
17                 p2.add(new Button("OK"));
18                 p2.add(new Button("Cancel"));
19                 add("South", p2);
20                 
21                 resize(280,120);
22                 show();
23         }
24         
25         public boolean action(Event evt, Object arg) {
26                 if (arg.equals("OK")) {
27                         dispose();
28                         parent.setPrefix(prefix.getText());
29                         
30                 }
31                 else if (arg.equals("Cancel")) {
32                         dispose();
33                 }
34                 else return super.action(evt, arg);
35                 return true;
36         }
37         
38         private TextField prefix;
39         
40         private spiderframe parent;
41 }