Rendering (streaming) HTML to a panel

My program generates results at the same time. I want to add each result, as soon as it enters the swing-thread, to a panel that will display the result of the html fragment, for example:

<ol class="result-type-a"><li class="foo-result"><html-output-of-result .../></li></ol> 

Is JTextPane the right component?

Are there any problems with my "streaming nature" display of information; for example, an output will be generated step by step as soon as new results appear that may require full analysis and rendering each time.

Is there a complete HTML rendering component in Java (CSS !!)? Or any other way to display information in a structured, easily formatted way, such as HTML + CSS?

+4
source share
1 answer

I have never had the opportunity to try, but it looks like the XHTMLRenderer might be useful to you.

+2
source

Source: https://habr.com/ru/post/1314005/


All Articles