views:

666

answers:

7

how can i embed a web browser within a java application?

Thanks, David

A: 

You can use SWT for this, here's a simple example.

Robert Munteanu
+3  A: 

There are a number of alternatives:

  • JEditorPane - included in the JRE, but only renders simple HTML
  • JDIC - open source, embeds native browser
  • ICEBrowser - commercial, renders the HTML in Java
  • WebRenderer - commercial, embeds native browser in Java

And a few more that don't seem to be under active development.

Michael Borgwardt
+1  A: 

If you want pure java solution, try Lomo.

Otherwise, you may use SWT / JRex or some other JNI-based product.

J-16 SDiZ
A: 

I got another one

The Lobo Project - Open Source

willcodejavaforfood
A: 

You can use mozswing. It works.

Geo
A: 

Flying Saucer is small and renders pretty well regular HTML pages

adrian.tarau
+1  A: 

If you need a pure Java solution then you can use JWebEngine. Its the best pure Java solution currently available.

Horcrux7