tags:

views:

266

answers:

3

I wonder what are the available pure embeddable Java HTML viewers? The requirements are:

  1. Should implement JComponent interface to be placed into Scrollable pane.
  2. Should be preferably a free solution; opensource is a plus.
  3. Availability as maven artifact is a plus.

I know only few components:

Potentially embeddable products:

Any other components?

+1  A: 

Check out this article: http://devdaily.com/blog/post/jfc-swing/how-create-simple-swing-html-viewer-browser-java

It uses JEditorPane and some other Swing classes to parse and render not only HTML, but also CSS.

Sean A.O. Harney
@Sean: Thanks for the answer, using `JEditorPane` is clear. I need alternatives.
dma_k
A: 

A good reference is: http://java-source.net/open-source/html-parsers

dimitko
@dimitko: Thanks for the link. I was aware about it. Unfortunately, the page contains mostly parsers, cleaners, etc, but not renderers. I need an alternative visual component.
dma_k
Excuse me, I must have been in a hurry. Only these two sparkled some faith in me:Lobo: http://lobobrowser.org/cobra.jspJDIC: https://jdic.dev.java.net/documentation/Specification.htmlHaven't tried them myself, though.
dimitko
+1  A: 

You can also access the native browser through something like: http://djproject.sourceforge.net/ns/

For certain web pages, this is sometimes the only way to go. There are always trade offs.

I have yet to find a browser component that renders well, is open source, and sufficiently flexible at the same time. Cobra comes close but there are pages that it won't render and it's tough (impossible?) to do things like get rid of its own scroll bars, etc..

PSpeed
@PSpeed: Nice. Thanks for the link.
dma_k