/Users/lyon/j4p/src/addBk/address/Help.java
|
1 package addBk.address;
2
3 import gui.html.HtmlSynthesizer;
4 import gui.ClosableJFrame;
5
6 import javax.swing.*;
7
8 /**
9 * DocJava, Inc.
10 * http://www.docjava.com
11 * Programmer: dlyon
12 * Date: Mar 24, 2004
13 * Time: 8:45:14 PM
14 */
15 public class Help {
16 HtmlSynthesizer hs = new HtmlSynthesizer();
17 ClosableJFrame cf = new ClosableJFrame("Help");
18 JEditorPane jep = new JEditorPane();
19
20 public Help() {
21 java.awt.Container c = cf.getContentPane();
22 c.setLayout(new java.awt.GridLayout(1, 0));
23 c.add(new javax.swing.JScrollPane(jep));
24 setHtml(toString());
25 }
26
27 public static void main(String[] args) {
28 Help h = new Help();
29 System.out.println(h);
30 h.display();
31 }
32
33 public void setHtml(String s) {
34 jep.setContentType("text/html");
35 jep.setText(s);
36 }
37 public void display() {
38 cf.setSize(400, 400);
39 cf.setVisible(true);
40 }
41
42 public String toString() {
43 return hs.getHtml(
44 HtmlSynthesizer.getH1("help"));
45 }
46 }
47