]> dxcluster.net Git - spider.git/blob - spider-web/dxannounce.java
added spanish help file, altered help to include new langyages
[spider.git] / spider-web / dxannounce.java
1 import java.awt.*;
2
3 public class dxannounce extends Dialog 
4 {
5         public dxannounce(spiderframe parent, String Call2, 
6                                  String Freq, String Remarks, Font font) {
7                 super(parent, "Dx Announce", true);
8                 this.parent = parent;
9                 this.setFont(font);
10                 
11                 
12                 
13                 Panel p1 = new Panel();
14                 p1.setLayout(new GridLayout(3,2));
15                 p1.add(new Label("Call: "));
16                 p1.add(call2 = new TextField(Call2,6));
17                 p1.add(new Label("Freq. in khz: "));
18                 p1.add(freq = new TextField(Freq));
19                 p1.add(new Label("Remarks"));
20                 p1.add(remarks = new TextField(Remarks,15));
21                 add("North", p1);
22                 
23                 // Panel p3 = new Panel();
24                 // p3.add(new Label("Remarks"));
25                 // p3.add(freq = new TextField(Remarks,30));
26                 // add("Center",p3);
27
28
29
30
31
32                 Panel p2 = new Panel();
33                 p2.add(new Button("OK"));
34                 p2.add(new Button("Cancel"));
35                 add("South", p2);
36                 
37                 resize(250,150);
38                 
39                 
40                 show();
41         }
42         
43         public boolean action(Event evt, Object arg) {
44                 if (arg.equals("OK")) {
45                         dispose();
46                         parent.setCall2(call2.getText());
47                         parent.setFreq(freq.getText());
48                         parent.setRemarks(remarks.getText());
49                         
50
51
52                 }
53
54
55                 else if (arg.equals("Cancel")) {
56                         dispose();
57                 }
58                 else return super.action(evt, arg);
59                 return true;
60         }
61         
62         private TextField call2;
63         private TextField freq;
64         private TextField remarks;      
65         private Font font = new Font("Courier" , Font.PLAIN ,16);
66         private spiderframe parent;
67 }