A Look at WebRenderer Swing Edition 5.0
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 examples, API documentation, and a developer's guide.






Comments
Aljoscha Rittner replied on Wed, 2010/02/24 - 1:48pm
Hi!
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
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
Jan Kotek replied on Thu, 2010/02/25 - 5:13am
Adam Metzler replied on Fri, 2010/02/26 - 5:44pm
Vladimir Ikryanov replied on Mon, 2010/12/06 - 10:37am
Anthony Scotney replied on Thu, 2011/01/13 - 5:20pm
in response to:
Vladimir Ikryanov