DJ NativeSwing 0.9.5 - State-of-the-art native component integration for Swing
DJ Native Swing 0.9.5 is finally out! And this is great news for us who just want to integrate native components in our rich Java Swing applications.
DJ Native Swing was designed to handle all the complexity of native integration, mainly in the form of components with a simple Swing-like API.
For the record, here are some screenshots of some of the components in action (click to enlarge):
| |
![]() | ![]() |
And here are the project links:
- Webstart demo: http://djproject.sourceforge.net/ns/DJNativeSwingDemo.jnlp
- Screenshots: http://djproject.sourceforge.net/ns/screenshots
- Native Swing: http://djproject.sourceforge.net/ns
This 0.9.5 version originally had humble goals: to expose a simpler API, have some Javadoc, improve examples, and consider user feedback to fix bugs and add new functionalities.
Well, it turns out that there was a large user feedback! And the good thing is that it was not focused on the web browser integration only, as I originally feared, but on all the components (Flash Player, VLC Player, Windows Media Player and HTML editor) as well as the framework.
This resulted in making the framework more robust and better adapted to practical needs.
So here is a list of new and noteworthy features:
- Documentation
- Code snippets, extracted from the demo application.
- Framework
- Improved stability and error reporting.
- Reduced memory and increased performance.
- Native components can be printed to an image.
- Native components have a unified and extensible way of handling their options, passed in their constructors.
- Simplified API for native components, browser-based components and Ole components.
- The native interface has a proper lifecycle: it can be closed and re-opened, some listeners allow to track such events.
- Improved debugging using all sorts of documented system properties.
- JWebBrowser
- Invoke Javascript functions that return a result synchronously.
- Commands sent by a web page back to the application now handle multiple parameters.
- JFlashPlayer
- Possibility to completely pilot a Flash application by calling Action script functions and receiving commands.
- Load a Flash file directly from the classpath.
- JVLCPlayer
- The API of the VLC plugin is completely exposed in a similar fashion.
- JHTMLEditor
- Customize the behavior by changing the FCKeditor configuration (like changing the toolbars).
- JWMediaPlayer
- More of the API of the Windows Media Player is exposed.
As usual, let me know what you think, so that the next release pushes the limits even further!
-Christopher
- Login or register to post comments
- 1252 reads
- Flag as offensive
- Email this Announcement
- Printer-friendly version
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)











Comments
apple_fan replied on Sat, 2008/05/17 - 11:22pm
This looks like a good solution, but will it be true cross-platform? All the components look just fine, but JWMediaPlayer sounds a bit alarming.
Anyway, I hope they'll add support for other platforms (at least OS X and Linux).
Christopher Deckers replied on Sun, 2008/05/18 - 3:46am
in response to: apple_fan
> will it be true cross-platform?
The framework is cross-platform and all the components except JWMediaPlayer are. This component serves mainly as an example for people who need to integrate Windows-only components.
The alternative to using JWMediaPlayer is the JVLCPlayer except that it has the drawback of having to be installed.
"True" cross-platform is possible where SWT supports being placed in a Swing component. This is possible on many platforms except Mac (due to the SWT bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=145890 ).
About this Mac issue, I may be able to work around the SWT bug if I had some help from a Mac developer with Carbon and Cocoa knowledge. If any such developer is reading this, contact me!
-Christopher