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

[1730 byte] By [Jethroa] at [2007-11-27 9:32:49]
# 1

> Is there a way to display the HTML correctly somehow?

Unfortunately NO, for now. The current HTML rendering capabilities of the Java Swing Package is far below standard and it can only be hoped to be fixed in later versions of the JDK. You will have to fin some other third party code if you still want to use html rendering in your project.

ICE

icewalker2ga at 2007-7-12 22:52:10 > top of Java-index,Desktop,Core GUI APIs...