Re: Anchor in JEditorPane is displayed as a space

From: Ann (Anna_at_nospam.invalid)
Date: 10/13/04


Date: Wed, 13 Oct 2004 17:56:27 GMT


"Christian Marko" <chris.marko@mwebdev.com> wrote in message
news:d18fbeec.0410122228.62185151@posting.google.com...
> Paul Lutus <nospam@nosite.zzz> wrote in message
news:<10ml9a2mji7bb39@corp.supernews.com>...
> > Christian Marko wrote:
> >
> > > Hi to all!
> > >
> > > I just have to display html-files. In these files anchors (like '<a
> > > name="xyz"></a>') are defined. The problem is, that at these places a
> > > space is displayed in the JEditorPane. As the anchors are defined in
> > > front of a first line of a paragraph, this looks horrible.
> > >
> > > In the JEditorPane it looks like the following:
> > > my first line
> > > my second line
> > > my third line
> > >
> > > Can anyone give me a hint, what i can do, to solve this problem?
> >
> > Put the anchor at the end of the line, not the beginning.
> >
>
> Putting the anchor to the beginning is not really a solution for my
> case, because a get a user manual with a lot of html files and i
> cannot change all files, moreover I have been told not to change the
> files.
>
> > Without seeing the actual, exact text that is in your JEditorPane, we
can't
> > determine the actual cause. One possible reason is an extraneous space
near
> > or within the tag.
>
> This a part of the html code, which is displayed:
>
> <p class="Body"><a name="340391"></a>This guide contains many
> important <span class="SpecialBold">warning and safety
> instructions</span>, which have to be followed by the user. </p>
> <p class="Body">
>
> In the original page it looks like the following:
>
> p class="Body">
> <a name="340391"> </a> This guide contains many important <span
> class="SpecialBold">warning and safety instructions</span>, which have
> to be followed by the user. </p>
> <p class="Body">
>
> I thought, that maybe the space between <a..> and </a> or after </a>
> causes this problem, but as you can see in the current changed version
> of the html code, there is no space in there, but the problem also
> occur.

try changing <p> to <br>



Relevant Pages