HTML table used in JTextPane not working with cellspacing="0" attribute
- From: btschumy@xxxxxxxxx
- Date: 20 Mar 2007 10:23:26 -0700
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". Is this a known problem or am I possibly doing something wrong?
I'm tried many variations. The code below was generated using
Netscape Composer and displays correctly in other browsers.
The file I'm loading is (sorry if the formatting is messed up):
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>Table</title>
</head>
<body>
<table style="text-align: left; width: 100%;" border="1"
cellpadding="2"
cellspacing="0">
<tbody>
<tr>
<td style="vertical-align: top;">Blah<br>
</td>
<td style="vertical-align: top;">val<br>
</td>
</tr>
<tr>
<td style="vertical-align: top;">Blah<br>
</td>
<td style="vertical-align: top;">val<br>
</td>
</tr>
</tbody>
</table>
<br>
</body>
</html>
.
- Follow-Ups:
- Re: HTML table used in JTextPane not working with cellspacing="0" attribute
- From: Andrew Thompson
- Re: HTML table used in JTextPane not working with cellspacing="0" attribute
- Prev by Date: How to print a JTextArea?
- Next by Date: Re: Automatically resize font when component size changes?
- Previous by thread: How to print a JTextArea?
- Next by thread: Re: HTML table used in JTextPane not working with cellspacing="0" attribute
- Index(es):
Relevant Pages
|
|