HTML JTextPane
Hi everybody,
I need to display somwthing like the following HTML page in a Java component:
<html>
<head>
<style>
body
{
font-family:'Courier New', Courier, monospace;
font-size:11px;
color:#333333;
font-weight:normal;
line-height: 140%;
text-align:justify;
margin-left:30px;
margin-top:5px;
}
div.equity
{
display:inline;
font-weight:bold;
display:inline;
}
div.test
{
color: rgb(0,220,0);
}
</style>
<title>Dit is een test pagina</title>
</head>
<body>
<h1>Test header</h1>
Dit is een test van verschillende HTML renderers in Java. Een <div class="test">impact</div> ziet er zo uit: <div style="font-weight: bold; border-bottom: 5px solid rgb(0,220,0);">AAA</div>. Dit is een <div class="equity">equity</div>.
</body>
</html>
I tried doing this in a JEditorPane, but this does not display the border-bottom style. The xhtmlrenderer of the Flying Saucer package does this correctly, however with this package I am not able of selecting the text, because it is non-selectable. Besides that I prefer to use a 'normal' Java component if that is possible. Is there a way to display the HTML correctly somehow?
Best regards,
Jethro

