Date: Wed, 17 Jun 1998 15:39:41 -0600 From: Sean Kelly <kelly@plutotech.com> To: Steve Price <sprice@hiwaay.net> Cc: java@FreeBSD.ORG Subject: Re: displaying HTML docs with JEditorPane? Message-ID: <3588379D.C74EB63@plutotech.com> References: <Pine.OSF.3.96.980617162206.22203A-100000@fly.HiWAAY.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Ooops! I misread that `createDefaultDocument' was a static method, but it's not. Try doing this instead: ---- import com.sun.java.swing.text.*; import com.sun.java.swing.text.html.*; ... JEditorPane htmlPane = new JEditorPane(); HTMLEditorKit editorKit = new HTMLEditorKit(); htmlPane.setEditorKit(editorKit); // Necessary? Dunno. Document doc = editorKit.createDefaultDocument(); try { doc.insertString(0, someString, null); } catch (Exception ex) {} htmlPane.setDocument(doc); ---- Good luck! --k To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3588379D.C74EB63>