ThreeB 1.1
|
3B plugin cclass to bring up a basic help window. More...
Public Member Functions | |
void | run (String arg) |
3B plugin cclass to bring up a basic help window.
Definition at line 17 of file ThreeBHelp.java.
void ThreeBHelp::run | ( | String | arg | ) | [inline] |
Definition at line 19 of file ThreeBHelp.java.
References Util::read().
{ String path = getClass().getResource("img/").toString(); Reader htmlstream = new InputStreamReader(getClass().getClassLoader().getResourceAsStream("instructions.html")); String html = Util.read(htmlstream); html = html.replaceAll("img/", path); JFrame w = new JFrame("3B help"); JEditorPane l = new JEditorPane(); try{ l.setPage(getClass().getResource("instructions.html").toString()); } catch(IOException e) {} //l.resize(new java.awt.Dimension(800,600)); JScrollPane s = new JScrollPane(l, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); java.awt.Dimension d = new java.awt.Dimension(600, 600); w.add(s); w.pack(); w.setSize(d); w.setVisible(true); }