1
17 package guk;
18
19 import java.awt.*;
20 import java.awt.event.*;
21
22 import javax.swing.*;
23
24 public class Editor_AboutBox extends JDialog implements ActionListener {
25
26 JPanel panel1 = new JPanel();
27 JPanel panel2 = new JPanel();
28 JPanel insetsPanel1 = new JPanel();
29 JPanel insetsPanel2 = new JPanel();
30 JPanel insetsPanel3 = new JPanel();
31 JButton button1 = new JButton();
32 JLabel imageLabel = new JLabel();
33 JLabel label1 = new JLabel();
34 JLabel label2 = new JLabel();
35 JLabel label3 = new JLabel();
36 JLabel label4 = new JLabel();
37 BorderLayout borderLayout1 = new BorderLayout();
38 BorderLayout borderLayout2 = new BorderLayout();
39 FlowLayout flowLayout1 = new FlowLayout();
40 GridLayout gridLayout1 = new GridLayout();
41 String product = "GATE Unicode Kit";
42 String version = "";
43 String copyright = "Copyright (c) 1999";
44 String comments = "";
45 public Editor_AboutBox(Frame parent) {
46 super(parent);
47 enableEvents(AWTEvent.WINDOW_EVENT_MASK);
48 try {
49 jbInit();
50 }
51 catch(Exception e) {
52 e.printStackTrace();
53 }
54 pack();
55 }
57
58 private void jbInit() throws Exception {
59 this.setTitle("About");
61 setResizable(false);
62 panel1.setLayout(borderLayout1);
63 panel2.setLayout(borderLayout2);
64 insetsPanel1.setLayout(flowLayout1);
65 insetsPanel2.setLayout(flowLayout1);
66 insetsPanel2.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
67 gridLayout1.setRows(4);
68 gridLayout1.setColumns(1);
69 label1.setText("GATE Unicode Kit Editor");
70 label2.setText(version);
71 label3.setText("Copyright (c) 2000 - 2001");
72 label4.setText(comments);
73 insetsPanel3.setLayout(gridLayout1);
74 insetsPanel3.setBorder(BorderFactory.createEmptyBorder(10, 60, 10, 10));
75 button1.setText("Ok");
76 button1.addActionListener(this);
77 insetsPanel2.add(imageLabel, null);
78 panel2.add(insetsPanel2, BorderLayout.WEST);
79 this.getContentPane().add(panel1, null);
80 insetsPanel3.add(label1, null);
81 insetsPanel3.add(label2, null);
82 insetsPanel3.add(label3, null);
83 insetsPanel3.add(label4, null);
84 panel2.add(insetsPanel3, BorderLayout.CENTER);
85 insetsPanel1.add(button1, null);
86 panel1.add(insetsPanel1, BorderLayout.SOUTH);
87 panel1.add(panel2, BorderLayout.NORTH);
88 }
90
91 protected void processWindowEvent(WindowEvent e) {
92 if (e.getID() == WindowEvent.WINDOW_CLOSING) {
93 cancel();
94 }
95 super.processWindowEvent(e);
96 }
98
99 void cancel() {
100 dispose();
101 }
102
103 public void actionPerformed(ActionEvent e) {
104 if (e.getSource() == button1) {
105 cancel();
106 }
107 }}