]> scm.dxcluster.org Git - spider.git/blob - spider-web/beam.java
remove typo in dxprothandle
[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                 else if (arg.equals("Cancel")) {
31                         dispose();
32                 }
33                 else return super.action(evt, arg);
34                 return true;
35         }
36         
37         private TextField prefix;
38         
39         private spiderframe parent;
40 }