From owner-freebsd-java Wed Jun 17 08:00:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA05734 for freebsd-java-outgoing; Wed, 17 Jun 1998 08:00:22 -0700 (PDT) (envelope-from owner-freebsd-java@FreeBSD.ORG) Received: from pluto.plutotech.com (mail.plutotech.com [206.168.67.137]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA05728 for ; Wed, 17 Jun 1998 08:00:19 -0700 (PDT) (envelope-from kelly@plutotech.com) Received: from plutotech.com (tampopo.plutotech.com [206.168.67.161]) by pluto.plutotech.com (8.8.7/8.8.5) with ESMTP id JAA10464; Wed, 17 Jun 1998 09:00:17 -0600 (MDT) Message-ID: <3587DA01.715F6993@plutotech.com> Date: Wed, 17 Jun 1998 09:00:17 -0600 From: Sean Kelly Organization: Pluto Technologies X-Mailer: Mozilla 4.04 [en] (X11; I; FreeBSD 3.0-CURRENT i386) MIME-Version: 1.0 To: Steve Price CC: java@FreeBSD.ORG Subject: Re: displaying HTML docs with JEditorPane? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I've never done this, but I'm guessing you need to first create a Document object that's compatible with HTML. java.swing.text.Document doc = java.swing.text.html.HTMLEditorKit.createDefaultDocument(); Then, initialize the doc with the HTML String returned by the server: doc.insertString(0, stringFromServer, null); Finally, you can use the setDocument method of the JEditorPane (actually inherited from JTextComponent): editorPane.setDocument(doc); Good luck. --k To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message