11

Does anyone know a way to open up an instance of the operating system (Windows/Linux/Mac) browser within a Swing window that is integrated into a Java application. No other actions would be performed other than opening a given URL. Currently, we open a new browser window because the Java embedded browsers have been insufficient. However, from a user interaction standpoint this is less than desirable.

I'm curious if a solution for this was part of the 1.6 Java release. So far my google searching has not turned up anything of note. Are there any closed-source libraries that do this?

Kirby
  • 15,127
  • 10
  • 89
  • 104
Elijah
  • 13,368
  • 10
  • 57
  • 89

5 Answers5

5

JDIC

Vincent Ramdhanie
  • 102,349
  • 23
  • 137
  • 192
ykaganovich
  • 14,736
  • 8
  • 59
  • 96
  • Your link is broken. Although I am using Chrome, so if it isn't, it's only my problem. – Feet Nov 17 '08 at 03:44
  • Documentation was here: 1) http://www.aswinanand.com/2006/03/two-minute-web-browser-in-java/ –  Dec 23 '11 at 21:02
  • it would be wonderful if this answer could be expanded to include some description of how the solution works rather than just a link. – Kirby Feb 13 '23 at 19:00
1

MozSwing it is free or JxBrowser or JExplorer ($500)

1

use JEditorPane

A text component to edit various kinds of content. By default, the following types of content are known: text/plain, text/html and text/rtf

or Lobo

Lobo is an open source web browser that is written completely in Java.

Seki
  • 11,135
  • 7
  • 46
  • 70
Fuangwith S.
  • 5,654
  • 8
  • 37
  • 41
1

We use JDIC as well and it works for us in Windows; however, configuring it to work in *nix/OS X can be a pain, as it simply utilizes a platform-native browser (supports IE and Mozilla), while on Linux/Mac you may have neither - that's the problem.

Sergey Borodavkin
  • 285
  • 1
  • 3
  • 7
1

WebRenderer is a commercial product that does this, and does it well. However, the last time I checked it was also pretty expensive (they wanted a $2 per-client fee for a large number of client, and a several $1000 support contract).

Michael Borgwardt
  • 342,105
  • 78
  • 482
  • 720