01: package com.sun.portal.proxylet.client.applet;
02:
03: /**
04: * Created by IntelliJ IDEA.
05: * User: Venugopala Rao Moram
06: * Date: Mar 26, 2004
07: * Time: 4:39:27 PM
08: * To change this template use File | Settings | File Templates.
09: */
10:
11: import com.sun.portal.proxylet.client.common.Param;
12: import com.sun.portal.proxylet.client.common.Param;
13:
14: import javax.swing.*;
15: import java.awt.*;
16: import java.awt.event.ActionEvent;
17: import java.awt.event.ActionListener;
18:
19: public class ProxyInfoHelpDialog extends JDialog implements
20: ActionListener {
21:
22: private JPanel mainPanel;
23: private GridBagConstraints gc;
24: private JTextArea help;
25: private JButton ok;
26:
27: public ProxyInfoHelpDialog(Frame parent) {
28: super (parent, Param.getString("pui.24",
29: "Finding browser proxy settings"));
30: setResizable(false);
31:
32: /* Initialize all components */
33: mainPanel = new JPanel();
34: gc = new GridBagConstraints();
35: help = new JTextArea(
36: Param
37: .getString(
38: "pinfo.27",
39: "For IE 5.x browsers:\\n\\t1. On the \"Tools\" menu in the Browser, click \"Internet Options\".\\n\\t2. Click the \"Connections\" tab, and then click \"LAN Settings\" tab.\\n\\nFor Netscape browsers:\\n\\t1. On the \"Edit\" menu in the browser, click \"Preferences\".\\n\\t2. Expand \"Advanced\" category, and then click \"Proxies\" option."),
40: 8, 40);
41: help.setEditable(false);
42: /* Set default state and arrange the components */
43: getContentPane().setLayout(new java.awt.GridBagLayout());
44: mainPanel.setLayout(new java.awt.GridBagLayout());
45: mainPanel.setBorder(new javax.swing.border.TitledBorder(Param
46: .getString("pinfo.28",
47: "How to find your browser proxy settings")));
48:
49: gc.anchor = gc.NORTHWEST;
50: gc.gridx = 0;
51: gc.gridy = 0;
52: mainPanel.add(help, gc);
53:
54: gc.gridx = 0;
55: gc.gridy = 1;
56: gc.anchor = GridBagConstraints.CENTER;
57: gc.fill = gc.NONE;
58: gc.insets = new Insets(10, 0, 0, 10);
59: gc.ipadx = 30;
60: ok = new JButton("ok");
61: ok.setActionCommand("OK");
62: ok.addActionListener(this );
63: mainPanel.add(ok, gc);
64:
65: gc.anchor = gc.NORTHWEST;
66: gc.gridx = 0;
67: gc.gridy = 0;
68: gc.weightx = 1;
69: gc.weighty = 1;
70: gc.gridheight = 5;
71: gc.gridwidth = 1;
72: gc.insets = new Insets(5, 0, 0, 0);
73: getContentPane().add(mainPanel, gc);
74:
75: pack();
76: ok.requestFocus();
77:
78: Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
79: Point pt = new Point();
80: pt.x = (d.width / 4);
81: pt.y = (d.height / 4);
82: setLocation(pt);
83:
84: }
85:
86: public void actionPerformed(ActionEvent evt) {
87: Object obj = evt.getSource();
88: if (obj == this .ok) {
89: this .setVisible(false);
90: }
91: }
92: }
|