Mitch Pronschinske is the Lead Research Analyst at DZone. Researching and compiling content for DZone's research guides is his primary job. He likes to make his own ringtones, watches cartoons/anime, enjoys card and board games, and plays the accordion. Mitch is a DZone Zone Leader and has posted 2576 posts at DZone. You can read more from them at their website. View Full User Profile

A Look at WebRenderer Swing Edition 5.0

  • submit to reddit

WebRenderer still claims the privilege of being the world’s first and only standards compliant, pure Swing embedded Java browser SDK.  With the recent release of WebRenderer Swing Edition 5.0, JadeLiquid Software continues its mission to improve the displays of rich client-side Java content on the web.  Along with Firefox 3.x support and new performance, security, memory, and graphics improvements, WebRenderer Swing Edition 5.0 continues to provide unique benefits for Java developers.

WebRenderer is built on Firefox 3.x and it supports IE and Safari as well.  Version 5.0's new JavaScript rendering engine has gotten major performance improvements along with better speed and memory performance.  Security and the Graphics Library also received improvements.  WebRenderer is aimed at addressing the fact that default HTML support in Swing has not kept up with today's browser standards.  While other tools solve this problem by embedding native OS browser components inside Java, WebRenderer avoids the requirement of having the prerequisite browser properly installed because their implementation is pure Swing.  

Pure Swing also allows support for features like Flash, CSS, and DHTML without having to install native browser support on the destination OS.  There is also a SSL Certificate interface, plugins such as Java Applets, and W3C DOM (including level 2).  WebRenderer combines the rendering quality of Firefox with Swing's lightweight drawing.  This includes support for Swing dialogs, components, and Java Look and Feels.  The WebRenderer architecture provides solid integration into Swing applications with Mozilla's content rendering and standards compliance in order to give Swing commercially legitimate web content rendering.

WebRenderer Supports:

Creating a WebRenderer Browser

To create a WebRenderer browser with WebRenderer add the following:

//Core call to enable the 30 day trial

BrowserFactory.setLicenseData("username", "serial");

//Creating the browser instance

IBrowserCanvas browser = BrowserFactory.spawnMozilla()
You can also spawnInternetExplorer() or spawnSafari().  Here is how you create the JPanel:
public JPanel browserPanel(){
   JPanel panel = new JPanel(new BorderLayout());
   IBrowserCanvas browser = BrowserFactory.spawnInternetExplorer();
   panel.add(BorderLayout.CENTER, (IEBrowserCanvas)browser);
   return panel;
JPanel includes a layout manager (BorderLayout) that expands to the size of the JPanel and properly suites the browser. IBrowserCanvas is WebRenderer's main Interface and it has many useful functions. To create an IBrowserCanvas object, just use the call: BrowserFactory.spawnInternetExploerer or BrowserFactory.spawnMozilla(). 

Next, the browser is cast to an IEBrowserCanvas class inheriting from Canvas that makes WebRenderer a component and adds it to the panel in the Center.  The browser is added to the Center in order to use up the sized panel's remaining space and the panel is returned to the calling function.  WebRenderer can also be cast to a standard Canvas like the one shown below:
Canvas canvas = (Canvas)browser;
Canvas canvas = (Canvas)browser;
WebRenderer DOM
The WebRenderer DOM is a large tree-like structure that allows you to access the underlying document.  A large number of various size elements have to be populated, so DOM methods must be called after the NetworkEvent onDocumentComplete has fired. Be aware that calling DOM methods like IBrowserCanvas getDocument before onDocumentComplete may return a DOM document that is not fully populated.  Here's an example of the WebRenderer DOM:
browser.addNetworkListener(new NetworkAdapter() {
public void onDocumentComplete(NetworkEvent e) {
// Get the DOM Document
IDocument document = browser.getDocument();
WebRenderer's website includes more code examplesAPI documentation, and a developer's guide.


Aljoscha Rittner replied on Wed, 2010/02/24 - 1:48pm


Oracle should buy jadeliquid and switch from JWebPane to WebRenderer (for Swing and JavaFX). Sorry, I'm dreaming.

br, josh.

cowwoc replied on Wed, 2010/02/24 - 8:56pm

How could it be pure Swing if you integrate with FireFox and IE?

Otengi Miloskov replied on Thu, 2010/02/25 - 12:16am

I will not pay for something just to show a web page, If thats the case I will intagrate Webkit or use Qt Webkit or anything like that in my app. Some people wants to make money with something it didnt meant for it. What a waste of time.

Also Why Oracle will want to buy this stuff? Oracle wants to make a profit and not waste time and money in something does not have or make a profit.



Christian Blicher replied on Thu, 2010/02/25 - 2:31am

I wish, they would mention the price for the product on their website. Why should I contact sales to get pricing information ?

/ Chris

Jose Maria Arranz replied on Thu, 2010/02/25 - 3:08am

I agree with arittner, Oracle or some company heavily based on Java should buy this technology and make it open source to boost desktop applications based on web technology AND put some money on Lobo/Cobra project.

Why both projects? Because a pure Java browser/web component like Lobo/Cobra is preferred and is better option for desktop applications, because FireFox does not need to be previously installed.

Edvin Syse replied on Thu, 2010/02/25 - 4:19am

I just tried it - first on Mac OS X 10.6.2 x64 and then on Windows 7 x64. None of those platforms seems to be supported. Bummer... What looks really good though, is the ability to manipulate the DOM, find DOM-elements at mouse-position, integrated WYSIWYG editing, applet support, and a whole slew of features missing from similar components.

Jan Kotek replied on Thu, 2010/02/25 - 5:13am

'Pure Swing' does not probably mean 'pure Java'. 

Adam Metzler replied on Fri, 2010/02/26 - 5:44pm

What about the LoboBrowser at This is a true Swing Browser that has JavaFX built in along with Java Applet support, and javascript with CSS2. It is completely open source and could use some user/developer support from the community. I think this should be the foundation for a java web rendering api. The project is composed of 2 parts, the browser (e.g. JFrame with plugin api) and the swing rendering engine (cobra toolkit).

Vladimir Ikryanov replied on Mon, 2010/12/06 - 10:37am

A well known competitor of WebRenderer is JxBrowser: It provides the same functionality and more. Plus the price is much cheaper.

Anthony Scotney replied on Thu, 2011/01/13 - 5:20pm in response to: Vladimir Ikryanov

Vladimir it is hardly impartial for you to comment given you are a/the JxBrowser developer. JxBrowser has no where near the same functionality as WebRenderer Swing Edition. JxBrowser is Heavyweight uses and AWT Peer just like WebRenderer Desktop released back in early 2003. The WebRenderer Swing Edition product is 100% lightweight. It renders entirely using Swing drawing calls. You of all people should understand the difference.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.