Forum Controls
Spotlight Features

The Rich Engineering Heritage Behind Dependency Injection

Andrew McVeigh takes us on a tour of the rich heritage behind dependency injection, what it represents, and tells us why its here to stay.

NetBeans 6: Matisse Updates

NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed.

Introduction to Groovy Part 3

In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.

Easier Custom Components with Swing Fuse

Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.

Benchmark Analysis: Guice vs Spring

Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.
Replies: 29 - Pages: 2   [ 1 2 | Next ]
Threads: [ Previous | Next ]
  Click to reply to this thread Reply

Native Web Browser, Flash Player for Swing applications

URL: DJ Project - Native Swing

At 12:23 PM on Jan 6, 2008, Christopher Deckers wrote:

Swing does not currently have a proper integration solution to embbed native components (1). Fortunately, there is a solution now: the DJ Project - Native Swing.

The DJ Project is a set of tools and libraries to enhance the user experience of Java on the Desktop.
Native Swing is part of this set: it is a library that allows to easily integrate some native components into Swing applications, and provides some native utilities to enhance Swing's APIs.

The main focus at this stage is the integration of a native Web Browser and Flash Player, using a Swing-like API. All the threading issues and general integration headaches are handled automatically.

Screenshots: http://djproject.sourceforge.net/ns/screenshots
Web Start Demo (win32 only): http://djproject.sourceforge.net/ns/DJNativeSwingDemo.jnlp

The demo is part of the release, so you can download it and try it out on other platforms (Linux)

It uses SWT Under the hood, so it should work everywhere SWT allows to be placed inside a Swing component. To get the web browser to work on Linux, follow the FAQ on SWT's website (it requires the XULRunner).

Let me know what you think. It is not a final version but it seems stable and probably can help to improve the current situation.


The DJ Project: http://djproject.sourceforge.net
Native Swing: http://djproject.sourceforge.net/ns


-Christopher


(1) The closest Web Browser one can think of is the JDIC Browser, but the way processes are seperated creates more problems and has many limitations.
1 . At 7:48 PM on Jan 6, 2008, Qil.Wong wrote:
  Click to reply to this thread Reply

Re: Native Web Browser, Flash Player for Swing applications

Oh, the JWebBrowser is really really great!!
2 . At 10:29 PM on Jan 6, 2008, James Selvakumar wrote:
  Click to reply to this thread Reply

Re: Native Web Browser, Flash Player for Swing applications

That's cool stuff.
The JWebBrowser and JFlashPlayer are very impressive.
Looking forward to use them in our swing apps.
3 . At 11:28 PM on Jan 6, 2008, Dmitri Trembovetski DeveloperZone Top 100 wrote:
  Click to reply to this thread Reply

Re: Native Web Browser, Flash Player for Swing applications

Looks nice!


Does it handle lightweight/heavyweight clipping issues?
(like if you have a JMenu overlapping your browser window)

Dmitri
Java2D Team Sun Microsystems, Inc
4 . At 2:48 AM on Jan 7, 2008, Christopher Deckers wrote:
  Click to reply to this thread Reply

Re: Native Web Browser, Flash Player for Swing applications

Hi Dmitri,

> Looks nice!

Thanks!

> Does it handle lightweight/heavyweight clipping
> issues?

Yes it does, by making popups heavyweight. It also handles focus grabbing issues and other such common problems (these are detailed in the first sections of the demo if you want to know more).

Cheers,
-Christopher
SWTSwing - DJ Project - UDoc - DZone Voting
5 . At 2:50 AM on Jan 7, 2008, Robert Stone wrote:
  Click to reply to this thread Reply

Re: Native Web Browser, Flash Player for Swing applications

Very impressive ! There is a problem on Windows/Vista though with the embedded media player demo, if I click the button to browse for a media file and then select the drives list drop down I get a black rectangle - looks like some sort of heavyweight/lightweight collision. See the attached picture. The drop down occasionally works but most of the time I get the black rectangle.

Anyway, great work - I hope it inspires Sun to give us these things as standard...

Rob
6 . At 2:51 AM on Jan 7, 2008, Robert Stone wrote:
  Click to reply to this thread Reply

Re: Native Web Browser, Flash Player for Swing applications

Here is the picture showing the black rectangle.
7 . At 2:53 AM on Jan 7, 2008, Kees Kuip wrote:
  Click to reply to this thread Reply

Linux?

I downloaded the release but there are no linux libraries inside it.

Does it work on Linux platform?

Kees.
8 . At 3:41 AM on Jan 7, 2008, Christopher Deckers wrote:
  Click to reply to this thread Reply

Re: Native Web Browser, Flash Player for Swing applications

Hm, I wish I had Vista to test.
My feel would be that it is a bug in the JRE because popups should be heavyweight, including the ones of combo boxes.

Hopefully I get to test that some day, or people at Sun could play with it and see if the bug is mine or theirs.

Thanks for the feedback, I'll keep that in mind!

-Christopher
SWTSwing - DJ Project - UDoc - DZone Voting
9 . At 3:48 AM on Jan 7, 2008, Christopher Deckers wrote:
  Click to reply to this thread Reply

Re: Linux?

Hi Kees,

> Does it work on Linux platform?

Yes it does. The readme file gives some information about how to set things up.

Basically, you just need to have SWT 3.4 for your platform in your classpath. For the demo to work, simply place the SWT JAR file named "swt.jar" alongside the JAR of the demo. The Web Browser also needs the XULRunner as explained in the SWT FAQ.

The Web Browser works properly on Linux as far as I can tell. This is the key component of this library.
The Flash player partially works, and I would need to investigate to make it fully working (it asks for local permission, and it does not allow to set variables...)

Cheers,
-Christopher
SWTSwing - DJ Project - UDoc - DZone Voting
10 . At 6:05 AM on Jan 7, 2008, Arek Stryjski wrote:
  Click to reply to this thread Reply

Re: Native Web Browser, Flash Player for Swing applications

Nice!

Are you planing to add also support for OSX?
11 . At 7:06 AM on Jan 7, 2008, Christopher Deckers wrote:
  Click to reply to this thread Reply

Re: Native Web Browser, Flash Player for Swing applications

> Are you planing to add also support for OSX?

Maybe it does work for OSX, I just don't know because I don't have one to develop and test on.
Moreover, I don't know if the feature of embedding SWT in AWT is supported on OSX.

-Christopher
SWTSwing - DJ Project - UDoc - DZone Voting
12 . At 11:57 AM on Jan 7, 2008, Riyad Kalla DeveloperZone Top 100 wrote:
  Click to reply to this thread Reply

Re: Native Web Browser, Flash Player for Swing applications

Christopher,
Your work in general continues to impress me. You seem to only like solving really hard problems (UI lightweight/native integration, event handling across frameworks, rendering, etc.) and pretty much are kicking ass at it.

I'm impressed with myself when I use punctuation in sentences...

Keep up the good work!
Best, Riyad [kallasoft | The "Break it Down" Blog]
13 . At 12:12 PM on Jan 7, 2008, Christopher Deckers wrote:
  Click to reply to this thread Reply

Re: Native Web Browser, Flash Player for Swing applications

Hi Riyad,

> Your work in general continues to impress me. You
> seem to only like solving really hard problems (UI
> lightweight/native integration, event handling across
> frameworks, rendering, etc.) and pretty much are
> kicking ass at it.

The technical challenges (especially people saying something is impossible), trying to improve the situation and these encouraging messages are the reasons for me to do it. So it is me who thank you!

-Christopher
SWTSwing - DJ Project - UDoc - DZone Voting
14 . At 12:52 PM on Jan 7, 2008, Kimmig wrote:
  Click to reply to this thread Reply

Re: Native Web Browser, Flash Player for Swing applications

"That stuff looks da bomb, G!"


Like I heard the people talk about it on the streets. ;)



I just wished it would be all cross-platform out of the box.

thread.rss_message