]> dxcluster.org Git - spider.git/blob - spider-web/InfoDialog.java
create new prefix_data.pl file
[spider.git] / spider-web / InfoDialog.java
1 import java.awt.*;
2
3 public class InfoDialog extends Dialog {
4         protected Button button;
5         protected MultiLineLabel label;
6         
7         
8         public InfoDialog(Frame parent, String title, String message) { 
9                 super(parent, title, false);
10         
11                 this.setLayout(new BorderLayout(15,15));
12                 label = new MultiLineLabel(message, 20, 20, 1);
13                 this.add("Center", label);
14         
15                 button = new Button("OK");
16                 Panel p = new Panel();
17                 p.setLayout(new FlowLayout(FlowLayout.CENTER, 15, 15));
18                 p.add(button);
19                 this.add("South", p);
20         
21                 this.pack();
22                 this.show();
23         }
24
25         public boolean action(Event e, Object arg) {
26                 if (e.target == button) {
27                         this.hide();
28                         this.dispose();
29                         return true;
30                 }
31                 else return false;
32         }       
33         
34         public boolean gotFocus(Event e, Object Arg) {
35                 button.requestFocus();
36                 return true;
37         }
38 }