1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package net.sf.jameleon.ui;
20 import java.awt.event.ActionEvent;
21 import java.awt.event.ActionListener;
22 import java.util.ResourceBundle;
23
24 import javax.swing.Box;
25 import javax.swing.JButton;
26 import javax.swing.JDialog;
27 import javax.swing.JFrame;
28 import javax.swing.JLabel;
29 import javax.swing.JPanel;
30
31
32 public class AboutDialog extends JDialog{
33 private static final long serialVersionUID = 1L;
34
35 public AboutDialog(JFrame rootFrame){
36 super(rootFrame, "About Jameleon", true);
37 init();
38 setVisible(true);
39 }
40
41 private void init(){
42 Box b = Box.createVerticalBox();
43 b.add(Box.createGlue());
44 b.add(new JLabel("Description:"));
45 b.add(new JLabel("<html><blockquote>Jameleon is a data-driven automated testing tool that is easily "+
46 "extensible via plug-ins. Features of applications are automated in Java and tied "+
47 "together independently in XML, creating self-documenting automated test cases."+
48 "</blockquote></html>"));
49
50 ResourceBundle rs = ResourceBundle.getBundle("jameleon-core-version");
51 b.add(new JLabel("Version: "+rs.getString("version")));
52 b.add(Box.createGlue());
53 getContentPane().add(b, "Center");
54
55 JPanel p2 = new JPanel();
56 JButton ok = new JButton("Ok");
57 p2.add(ok);
58 getContentPane().add(p2, "South");
59
60 ok.addActionListener(new ActionListener() {
61 public void actionPerformed(ActionEvent evt) {
62 setVisible(false);
63 dispose();
64 }
65 });
66
67 setSize(350, 250);
68 }
69
70 }