01: package hero.client.grapheditor;
02:
03: import java.awt.BorderLayout;
04: import java.net.URL;
05:
06: import javax.swing.JEditorPane;
07: import javax.swing.JFrame;
08:
09: public class Info extends JFrame {
10:
11: static java.util.ResourceBundle resource = java.util.ResourceBundle
12: .getBundle("resources.Traduction")/*#BundleType=List*/;
13:
14: private static Info INSTANCE = new Info();
15:
16: private Info() {
17: super (resource.getString("info.about"));
18: setSize(276, 322);
19: setResizable(false);
20: setIconImage(Frame.getFrame().getIconImage());
21: JEditorPane html = new JEditorPane();
22: html.setEditable(false);
23: html.setContentType("text/html");
24: URL url = Thread.currentThread().getContextClassLoader()
25: .getResource(Frame.imageBase + "logo.png");
26: html.setText("<html><body background='" + url
27: + resource.getString("info.html"));
28: getContentPane().add(html, BorderLayout.CENTER);
29: }
30:
31: public static void showInfo() {
32: INSTANCE.setLocation(((Frame.getFrame().getWidth() - INSTANCE
33: .getWidth()) / 2)
34: + Frame.getFrame().getX(), ((Frame.getFrame()
35: .getHeight() - INSTANCE.getHeight()) / 2)
36: + Frame.getFrame().getY());
37: INSTANCE.setVisible(true);
38: }
39:
40: }
|