]> gb7djk.dxcluster.net Git - spider.git/blob - spider-web/dxannounce.java
remove warnings and add base pc92 handling
[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                 Panel p1 = new Panel();
12                 p1.setLayout(new GridLayout(3,2));
13                 p1.add(new Label("Call: "));
14                 p1.add(call2 = new TextField(Call2,6));
15                 p1.add(new Label("Freq. in khz: "));
16                 p1.add(freq = new TextField(Freq));
17                 p1.add(new Label("Remarks"));
18                 p1.add(remarks = new TextField(Remarks,15));
19                 add("North", p1);
20                 
21                 // Panel p3 = new Panel();
22                 // p3.add(new Label("Remarks"));
23                 // p3.add(freq = new TextField(Remarks,30));
24                 // add("Center",p3);
25
26                 Panel p2 = new Panel();
27                 p2.add(new Button("OK"));
28                 p2.add(new Button("Cancel"));
29                 add("South", p2);
30                 
31                 resize(250,150);
32                 
33                 show();
34         }
35         
36         public boolean action(Event evt, Object arg) {
37                 if (arg.equals("OK")) {
38                         dispose();
39                         parent.setCall2(call2.getText());
40                         parent.setFreq(freq.getText());
41                         parent.setRemarks(remarks.getText());
42                 }
43
44                 else if (arg.equals("Cancel")) {
45                         dispose();
46                 }
47                 else return super.action(evt, arg);
48                 return true;
49         }
50         
51         private TextField call2;
52         private TextField freq;
53         private TextField remarks;      
54         private Font font = new Font("Courier" , Font.PLAIN ,16);
55         private spiderframe parent;
56 }