]> dxcluster.net Git - spider.git/blob - spider-web/PersonalPreferences.java
fix DXVars.pm overrides line $clusterport
[spider.git] / spider-web / PersonalPreferences.java
1 import java.awt.*;
2
3 public class PersonalPreferences extends Dialog 
4 {
5         public PersonalPreferences(spiderframe parent, String Call, 
6                                  String Fullname, Font font) {
7                 super(parent, "Personal Preferences", true);
8                 this.parent = parent;
9                 this.setFont(font);
10                 
11                 Panel p1 = new Panel();
12                 p1.setLayout(new GridLayout(2,2));
13                 p1.add(new Label("Call: "));
14                 p1.add(call = new TextField(Call, 6));
15                 p1.add(new Label("Passwort: "));
16                 p1.add(fullname = new TextField(Fullname));
17                 add("Center", p1);
18                 
19                 Panel p2 = new Panel();
20                 p2.add(new Button("OK"));
21                 p2.add(new Button("Cancel"));
22                 add("South", p2);
23                 
24                 resize(250,120);
25                 show();
26         }
27         
28         public boolean action(Event evt, Object arg) {
29                 if (arg.equals("OK")) {
30                         dispose();
31                         parent.setCall(call.getText());
32                         parent.setFullname(fullname.getText());
33                 }
34                 else if (arg.equals("Cancel")) {
35                         dispose();
36                 }
37                 else return super.action(evt, arg);
38                 return true;
39         }
40         
41         private TextField call;
42         private TextField fullname;
43         
44         private spiderframe parent;
45 }