The Source for Java Technology Collaboration
User: Password:



Artem Ananiev's Blog

May 2008 Archives


Introducing JWebPane component

Posted by ixmal on May 29, 2008 at 02:26 AM | Permalink | Comments (21)

Recently, at the JavaOne conference, Sun has introduced several new JavaFX related technologies and products. The Scene Graph and WebKit session was one of the technical sessions to present such advanced technologies:

Inside The JavaFX™ Script Technology-Based Runtime APIs: Scene Graph & JWebPane Component

This blog entry opens a series of articles about the technology described in the second part of the presentation - HTML component JWebPane. I'm set to explain what is it, when it could be employed in your application and when it couldn't be. :)

For many years, Java lacked a worthy component to render HTML content. HTML support in Swing was limited to the 3.2 version. Although the SwingLabs JDIC library provides a browsing component, it is hard to integrate into Swing applications because of its heavyweight implementation. The new component - JWebPane is not intended to substitute all known alternatives, however, it brings HTML support and easiness of use up to the high-level standard.

Those who attended the JavaOne session already know that JWebPane is based on the widely recognized open sourced engine - WebKit. It is not a secret any more. :) The WebKit architecture consists of two considerable parts. The first one is cross-platform, it is responsible for parsing documents, generating DOM, supporting JavaScript. Another part, platform-dependent, so called "port", is intended for communicating with network, rendering graphic content on the screen and other devices, event handling, and other features. JWebPane is a Java port, in which all cross-platform calls are implemented in Java.

Additionally, each port provides an API to develop browsing functionality using a particular library. For Java port, it is non surprisingly JavaFX. Moreover, JWebPane will became available in Swing applications. At the moment the API provides the following capabilities: adding the JWebPane component to the hierarchy of graphic components, documents loading control, handling the loading status events, navigation history support, and new windows control (both adding and removing). This API is supposed to be extended, if needed.

Finally, I'd like to demonstrate a small screen shot of the JWebPane application with new Nimbus Look and Feel available in JDK 6u10:



Next time I'll expose some technical details of the Java-port implementation and its interaction with WebKit.

Other blogs related to JWebPane:





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds