🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #10078

Re: Using JEditorPane to Display a Local HTML file

#10078
From: Marc Palmer
Date: Tue, 16 Nov 1999 00:00
18 lines
1672 bytes
In article <80q9dc$pno$1@news7.svr.pol.co.uk>, 
cs98abh@cs98abh.fsnet.co.uk says...
> Hi
> 
> I need to use the Java Swing JEditorPane to display an HTML file that is
> stored in the ./help/helpFile.htm direcotry. Ie. in a subdirectory below
> where my source code is held. I have done the following:
> 
> JEditorPane.setEditable(false);
> JEditorPane.setPage("help/helpFile.htm");
> 
> However I get MalformedURLExceptions from this. Should I specifiy a
> protocol? If so how?

file://help/helpFile.htm will probably do it. On windoze in test programs 
"x:\filename" works but is of course just a hack for testing.
 
Cheers
Technical Details
Message-ID: <MPG.129b5bf6a0f4ae29897b8@192.168.200.5>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <80q9dc$pno$1@news7.svr.pol.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,905daaa275364cdd
X-Google-Attributes: gid111d45,public
X-Google-Thread: f5d71,905daaa275364cdd
X-Google-Attributes: gidf5d71,public
X-Google-Thread: 10a146,905daaa275364cdd
X-Google-Attributes: gid10a146,public
X-Google-Thread: 10fd6d,905daaa275364cdd
X-Google-Attributes: gid10fd6d,public
X-Google-Thread: 113ae9,905daaa275364cdd
X-Google-Attributes: gid113ae9,public
From: Marc Palmer <marc@anyware.co.uk>
Subject: Re: Using JEditorPane to Display a Local HTML file
Date: 1999/11/16
Message-ID: <MPG.129b5bf6a0f4ae29897b8@192.168.200.5>
X-Deja-AN: 549241936
X-NNTP-Posting-Host: anyware.demon.co.uk:193.237.14.77
References: <80q9dc$pno$1@news7.svr.pol.co.uk>
X-Trace: news.demon.co.uk 942754810 nnrp-01:16525 NO-IDENT anyware.demon.co.uk:193.237.14.77
Organization: AnyWare Ltd.
Newsgroups: borland.public.jbuilder.java.swing,comp.lang.java,comp.lang.java.gui,comp.lang.java.help,comp.lang.java.programmer
X-Complaints-To: abuse@demon.net