01: // @(#)ProxyWarning.java 1.11 "@(#)ProxyWarning.java 1.11 01/01/30 Sun Microsystems"
02:
03: package com.sun.portal.netlet.client.common;
04:
05: import java.awt.*;
06: import java.awt.event.ActionListener;
07:
08: public class ProxyWarning extends Dialog {
09:
10: public Button okButton;
11: TextArea t;
12:
13: public ProxyWarning(Frame f, ActionListener a, String browser) {
14: super (f, ResourceProperties.getString("pwarn.3"));
15:
16: GridBagLayout gb = new GridBagLayout();
17: GridBagConstraints gc = new GridBagConstraints();
18:
19: setLayout(gb);
20:
21: gc.fill = GridBagConstraints.NONE;
22: gc.gridwidth = GridBagConstraints.REMAINDER;
23: gc.gridheight = 1;
24:
25: gc.gridx = 0;
26: gc.gridy = 0;
27: if (browser.equals("Netscape")) {
28: t = new TextArea(ResourceProperties.getString("pwarn.1ns"),
29: 8, 60, TextArea.SCROLLBARS_NONE);
30: } else if (browser.equals("MRJ")) {
31: t = new TextArea(
32: ResourceProperties.getString("pwarn.3mac"), 8, 60,
33: TextArea.SCROLLBARS_NONE);
34: } else {
35: t = new TextArea(ResourceProperties.getString("pwarn.2ie"),
36: 8, 60, TextArea.SCROLLBARS_NONE);
37: }
38: t.setEditable(false);
39: gc.insets = new Insets(10, 5, 5, 5);
40: gb.setConstraints(t, gc);
41: add(t);
42:
43: gc.gridy = 1;
44:
45: okButton = new Button(ResourceProperties.getString("pwarn.5"));
46: okButton.setActionCommand("OK");
47: okButton.addActionListener(a);
48: gb.setConstraints(okButton, gc);
49: add(okButton);
50:
51: pack();
52:
53: Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
54: Point pt = new Point();
55: pt.x = (d.width / 4);
56: pt.y = (d.height / 4);
57: setLocation(pt);
58: }
59:
60: public void setMessage(String msg) {
61: t.setText(msg);
62: }
63: }
|