Re: HTML table used in JTextPane not working with cellspacing="0" attribute
- From: "Andrew Thompson" <andrewthommo@xxxxxxxxx>
- Date: 20 Mar 2007 18:41:35 -0700
On Mar 21, 4:23 am, btsch...@xxxxxxxxx wrote:
In Java 1.6 on Windows, I'm trying to display an HTML table in a
JTextPane where cellspacing="0". It should display the cell borders
as a single line but it is instead displaying it as if cellspacing was
"1".
Interestingly,
1) cellspacing="20" makes a huge space, so it seems
to be honouring that attribute at some level, in some
form. I suspect that there is some other spacing in
there that the JEditorPane is (in its simplistic styling
of HTML) expecting to see for a true 'no pad' cell.
2) That document is valid HTML 3.2 Transitional!
(Yeah, you probably already knew that, but that is
just the first time anybody that I have seen, has
asked a question about JEP rendering, *and* were using
well-formed HTML - which I thought worthy of note.)
As a piece of general advice: Remove all style
attributes from HTML and put them in an external
style***, so that they can be validated in a CSS
validator. (It looks fine to me, but I am not as
accurate as a software validator.)
If I have any further insights into it, I
will pop back by.
Andrew T.
.
- Follow-Ups:
- References:
- Prev by Date: Re: How to print a JTextArea?
- Next by Date: Re: How to print a JTextArea?
- Previous by thread: HTML table used in JTextPane not working with cellspacing="0" attribute
- Next by thread: Re: HTML table used in JTextPane not working with cellspacing="0" attribute
- Index(es):