01: /*
02: * ScriptFrame.java
03: *
04: * Created on April 30, 2002, 11:50 AM
05: */
06: package tools.tracesviewer;
07:
08: import java.awt.*;
09: import java.awt.event.*;
10:
11: /**
12: *
13: * @author deruelle
14: * @version
15: */
16: public class ScriptFrame extends Dialog {
17:
18: public TextArea infoTextArea;
19: public Container container;
20: public Button ok;
21:
22: /** Creates new ScriptFrame */
23: public ScriptFrame() {
24: super (new Frame(), " Auxiliary information ", false);
25: initComponents();
26: }
27:
28: public void initComponents() {
29:
30: setLayout(new BorderLayout());
31: setBackground(Color.lightGray);
32: setSize(512, 384);
33:
34: /**********************************************************************/
35:
36: infoTextArea = new TextArea();
37: infoTextArea.setEditable(false);
38: infoTextArea.setBackground(Color.white);
39: add(infoTextArea, BorderLayout.CENTER);
40:
41: ok = new Button(" Ok ");
42: ok.setBackground(Color.lightGray);
43: ok.setForeground(Color.black);
44: add(ok, BorderLayout.SOUTH);
45: ok.addMouseListener(new MouseAdapter() {
46: public void mouseClicked(MouseEvent e) {
47: setVisible(false);
48: dispose();
49: }
50: });
51:
52: this .addWindowListener(new WindowAdapter() {
53: public void windowClosing(WindowEvent e) {
54: setVisible(false);
55:
56: dispose();
57:
58: }
59: });
60:
61: setVisible(false);
62: }
63:
64: public void setText(String host, String text) {
65: setTitle("Auxiliary information for " + host);
66: infoTextArea.setText(text);
67: }
68:
69: }
|