Swing Browser Take 2: MozSwing
By mturkel | July 21, 2008
LimeWire has included the SWT web browser for awhile now, embedding it in our Swing application using the SWT-AWT bridge. Unfortunately, this only works on Windows and we need a browser on all platforms. Though Sun’s lightweight WebKit-based JWebPane is coming, it is uncertain when … Enter MozSwing.
MozSwing embeds Mozilla (more specifically, Xulrunner) in Swing and can be used like any other Swing component as it handles most of the lightweight-heavyweight issues for you. It gives you access to XPCOM and all manner of DOM manipulation.
The simplest way to use it is through MozillaPanel:
MozillaPanel mozilla = new MozillaPanel(); someSwingContainer.add(mozilla);
That’s it!
To navigate programatically:
mozilla.load("http://limewire.com");
Here is MozSwing in LimeWire:

Also, if you already have Flash installed for Firefox, it plays Flash right out of the box.
There is very little information on the SourceForge project page but more can be found on the mailing list.

Comments and Trackbacks
Elie Khoury Says:
December 20th, 2008 at 12:11 pm |
Permalink
What about the different in size of the new LimeWire?
I’m downloading already the 50MB package of MozSwing.
mturkel Says:
April 14th, 2009 at 1:07 pm |
Permalink
The MozSwing download has binaries for all OSes but we only package the necessary binaries for the OS with LimeWire so it isn’t very big.