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. (sponsored)
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.
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.
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.
> Maybe you can mention installing XULrunner in your
> readme.txt.
I prefered to point to the SWT FAQ in the readme file, which mentions XULRunner.
> Is it possible to get this working with linux and
> jnlp?
I believe yes, provided that XULRunner or other such requirements are present. Because of them, I don't offer a Webstart version for Linux so that users follow a proper setup.
> I didn't get it working with jdk1.5 though (only with
> jdk1.6).
It works on a JRE 5.0 and later. It is just that a bug prevented to integrate SWT in Swing on Linux with certain JREs. The fix is definitely present in the latest 6.0, but I don't know if it got back ported to 5.0...
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
Very odd, because it seems to work fine on my machine. Vista Premium, Java 6.
I looked at the jnlp-file and I don't see any native libraries being downloaded. So how do you manage to get the windows-jnlp working without installing XULRunner?
On Windows, it uses Internet Explorer by default. If you want to use Mozilla instead, then you need to set a system property ("webbrowser" to the value "mozilla").
When my library sees this property, it will construct the SWT browser component using the MOZILLA style. I believe in that case it would need XULRunner.
Re: Native Web Browser, Flash Player for Swing applications
A-ha, what a "brand-new" idea... especially when the same examples including sources are available in other products already for years.
For example, several years ago I saw the ComfyJ demo application ( http://www.teamdev.com/comfyj/demo.jsf) and it provided much more rich functionality, which allows to embed not only "flash" or "player" to the Swing UI, but _any_ ActiveX component. The funny thing is that in this "DJ"'s demo even UI is "borrowed" lol
Re: Native Web Browser, Flash Player for Swing applications
> A-ha, what a "brand-new" idea... especially when
> the same examples including sources are available in
> other products already for years.
Thanks for the info. I have a few remarks though.
ComfyJ seems to be Windows only, DJ Native Swing is portable where SWT allows to be integrated in Swing. That includes at least Windows and Linux.
ComfyJ is not free.
ComfyJ is not implemented and maintained by as many people as there are behind SWT and Swing. SWT and Swing bring confidence in the product if the integration foundations are solid.
DJ Native Swing allows to integrate any Ole component, but not only as it brings other platform capabilities from SWT to the Swing world.
In fact, I wonder why anyone would want to use ComfyJ.
Re: Native Web Browser, Flash Player for Swing applications
I have several remarks too:
> ComfyJ seems to be Windows only, DJ Native Swing is
> portable where SWT allows to be integrated in Swing.
> That includes at least Windows and Linux.
Yes, ComfyJ is for Windows platform only because:
- it is the COM bridge, and as you probably know, COM technology is available on Windows platforms only;
- yes, it is designed for Swing only, because it does not use SWT anyhow;
- ComfyJ itself does not include any platform specific features, because there are another special WinPack, MacPack etc. products for that;
- and finally it is based on JNIWrapper technology, which is a cross platform library that supports all popular platforms: http://www.teamdev.com/jniwrapper/index.jsf
> ComfyJ is not free.
Oh, you saw that before, I did not doubt that. Of course, ComfyJ is the commercial product. But I would rather consider it as the advantage of a product.
> ComfyJ is not implemented and maintained by as many
> people as there are behind SWT and Swing. SWT and
> Swing bring confidence in the product if the
> integration foundations are solid.
Solid in this case does not mean reliable and convenient after all. I would not mix such absolutely different things as native bridging and Swing/SWT development.
I suspect you're not related to any of those processes, just doing "bridging", but it does not provide any confidence to your product automatically.
> DJ Native Swing allows to integrate any Ole
> component, but not only as it brings other platform
> capabilities from SWT to the Swing world
Yeah, it just gives as much as SWT, not more nor less. In other words, "DJ" does not provide more capabilities than SWT, assuming that you have just wrapped some features of SWT.
> In fact, I wonder why anyone would want to use
> ComfyJ.
I would not say that taking into account that ComfyJ product is already present several years on the market: http://www.teamdev.com/comfyj/whats_new.jsf, and their impressive list of customers. It seems that you just got quite limited information.
So, after all "DJ NS" is just the Swing "sauce" over SWT bridge, let's admit it. And for me, such stuff is quite strange, even suspicious mix, though its "visual results" may look good at the first glance...
Re: Native Web Browser, Flash Player for Swing applications
J.,
* You wrote 6 posts (from old to new):
1. says JNIWrapper is better.
2. says JExplorer is better.
3. says JNIWrapper is better.
4. says that Excelsior's JNI is bad.
5. says that ComfyJ is better.
6. says that ComfyJ and JNIWrapper are better.
* JNIWrapper, JExplorer and ComfyJ are all from TeamDev
* TeamDev has a phone number in Ukraine.
* Your online status says you are from Ukraine.
I let everyone to make their conclusion, but I would advise you moderate the criticisms or that you give full disclosure.
Re: Native Web Browser, Flash Player for Swing applications
Christopher,
> You wrote 6 posts (from old to new):
Yes, I do not refuse from my own words. Otherwise I would just create a new account. I always mention these products because I like and use them for years.
> Your online status says you are from Ukraine.
Really? Then you are in France, I also glad to meet you.
> JNIWrapper, JExplorer and ComfyJ are all from TeamDev
Yes, this is exactly what I told in the previous message.
> TeamDev has a phone number in Ukraine.
Oh, I guess it's easy to find their support phone on the site, isn't?
> I let everyone to make their conclusion,
I doubt so, otherwise you would not react in such manner on my comments.
As you may notice I do not spam here. I just try to compare different products from technical point of view, so everyone may find the real facts, but not just advertisements.
This new 0.9.2 version fixes several bugs, including major ones affecting the Flash player under Linux. As far as I can tell, the Linux and Windows Flash players both behave as expected.
Note that I don't have a Mac, so I don't know if it works there (I don't know if SWT for that platform supports integration in Swing components)
The library looks great! I had some experience working with JDIC, but this looks by far better. There's one issue though I keep running into: sometimes IE crashes sayng: "javaw.exe has encountered a problem and needs to close..." - it's a standard windows dialog. I tried to narrow this down, but it's proving rather difficult. It looks like it's crashing when the browser window is somewhat small. I used the SimpleWebBrowserExample example, invoking it like following:
JFrame frame = new JFrame("Browser!");
frame.add(new Browser());
frame.setSize(400, 400);
frame.setVisible(true);
and it crashes each time. Then I change the size to 1000x1000 and it stops crashing.
I have IE7, so it might be just as well its problem - it's a well known bug magnet. I guess I was just wondering if you ever ran across anything like this...
Re: Linux?
Thanks, I got it working now.I didn't get it working with jdk1.5 though (only with jdk1.6).
Maybe you can mention installing XULrunner in your readme.txt.
Is it possible to get this working with linux and jnlp?
Re: Linux?
> Maybe you can mention installing XULrunner in your> readme.txt.
I prefered to point to the SWT FAQ in the readme file, which mentions XULRunner.
> Is it possible to get this working with linux and
> jnlp?
I believe yes, provided that XULRunner or other such requirements are present. Because of them, I don't offer a Webstart version for Linux so that users follow a proper setup.
-Christopher
Re: Linux?
> I didn't get it working with jdk1.5 though (only with> jdk1.6).
It works on a JRE 5.0 and later. It is just that a bug prevented to integrate SWT in Swing on Linux with certain JREs. The fix is definitely present in the latest 6.0, but I don't know if it got back ported to 5.0...
-Christopher
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
Very odd, because it seems to work fine on my machine. Vista Premium, Java 6.
ActiveObjects: an Easier Java ORM; Fuse: Resource Injection for Java
Re: Linux?
I looked at the jnlp-file and I don't see any native libraries being downloaded. So how do you manage to get the windows-jnlp working without installing XULRunner?Kees
Re: Linux?
On Windows, it uses Internet Explorer by default. If you want to use Mozilla instead, then you need to set a system property ("webbrowser" to the value "mozilla").When my library sees this property, it will construct the SWT browser component using the MOZILLA style. I believe in that case it would need XULRunner.
-Christopher
Re: Native Web Browser, Flash Player for Swing applications
Nice work!Steve
Re: Native Web Browser, Flash Player for Swing applications
Looks great. It would be good if the Java team include that in Java 7 for Java multimedia support. I doubt though because of the use of SWT.Carl
Re: Native Web Browser, Flash Player for Swing applications
A-ha, what a "brand-new" idea...For example, several years ago I saw the ComfyJ demo application ( http://www.teamdev.com/comfyj/demo.jsf) and it provided much more rich functionality, which allows to embed not only "flash" or "player" to the Swing UI, but _any_ ActiveX component. The funny thing is that in this "DJ"'s demo even UI is "borrowed" lol
That's just for the information...
Re: Native Web Browser, Flash Player for Swing applications
> A-ha, what a "brand-new" idea...> the same examples including sources are available in
> other products already for years.
Thanks for the info. I have a few remarks though.
ComfyJ seems to be Windows only, DJ Native Swing is portable where SWT allows to be integrated in Swing. That includes at least Windows and Linux.
ComfyJ is not free.
ComfyJ is not implemented and maintained by as many people as there are behind SWT and Swing. SWT and Swing bring confidence in the product if the integration foundations are solid.
DJ Native Swing allows to integrate any Ole component, but not only as it brings other platform capabilities from SWT to the Swing world.
In fact, I wonder why anyone would want to use ComfyJ.
Cheers,
-Christopher
Re: Native Web Browser, Flash Player for Swing applications
I have several remarks too:> ComfyJ seems to be Windows only, DJ Native Swing is
> portable where SWT allows to be integrated in Swing.
> That includes at least Windows and Linux.
Yes, ComfyJ is for Windows platform only because:
- it is the COM bridge, and as you probably know, COM technology is available on Windows platforms only;
- yes, it is designed for Swing only, because it does not use SWT anyhow;
- ComfyJ itself does not include any platform specific features, because there are another special WinPack, MacPack etc. products for that;
- and finally it is based on JNIWrapper technology, which is a cross platform library that supports all popular platforms: http://www.teamdev.com/jniwrapper/index.jsf
> ComfyJ is not free.
Oh, you saw that before, I did not doubt that. Of course, ComfyJ is the commercial product. But I would rather consider it as the advantage of a product.
> ComfyJ is not implemented and maintained by as many
> people as there are behind SWT and Swing. SWT and
> Swing bring confidence in the product if the
> integration foundations are solid.
Solid in this case does not mean reliable and convenient after all. I would not mix such absolutely different things as native bridging and Swing/SWT development.
I suspect you're not related to any of those processes, just doing "bridging", but it does not provide any confidence to your product automatically.
> DJ Native Swing allows to integrate any Ole
> component, but not only as it brings other platform
> capabilities from SWT to the Swing world
Yeah, it just gives as much as SWT, not more nor less. In other words, "DJ" does not provide more capabilities than SWT, assuming that you have just wrapped some features of SWT.
> In fact, I wonder why anyone would want to use
> ComfyJ.
I would not say that taking into account that ComfyJ product is already present several years on the market: http://www.teamdev.com/comfyj/whats_new.jsf, and their impressive list of customers. It seems that you just got quite limited information.
So, after all "DJ NS" is just the Swing "sauce" over SWT bridge, let's admit it. And for me, such stuff is quite strange, even suspicious mix, though its "visual results" may look good at the first glance...
Re: Native Web Browser, Flash Player for Swing applications
J.,* You wrote 6 posts (from old to new):
1. says JNIWrapper is better.
2. says JExplorer is better.
3. says JNIWrapper is better.
4. says that Excelsior's JNI is bad.
5. says that ComfyJ is better.
6. says that ComfyJ and JNIWrapper are better.
* JNIWrapper, JExplorer and ComfyJ are all from TeamDev
* TeamDev has a phone number in Ukraine.
* Your online status says you are from Ukraine.
I let everyone to make their conclusion, but I would advise you moderate the criticisms or that you give full disclosure.
Cheers,
-Christopher
Re: Native Web Browser, Flash Player for Swing applications
Christopher,> You wrote 6 posts (from old to new):
Yes, I do not refuse from my own words. Otherwise I would just create a new account. I always mention these products because I like and use them for years.
> Your online status says you are from Ukraine.
Really? Then you are in France, I also glad to meet you.
> JNIWrapper, JExplorer and ComfyJ are all from TeamDev
Yes, this is exactly what I told in the previous message.
> TeamDev has a phone number in Ukraine.
Oh, I guess it's easy to find their support phone on the site, isn't?
> I let everyone to make their conclusion,
I doubt so, otherwise you would not react in such manner on my comments.
As you may notice I do not spam here. I just try to compare different products from technical point of view, so everyone may find the real facts, but not just advertisements.
Cheers,
J.
DJ Native Swing 0.9.2 is released
This new 0.9.2 version fixes several bugs, including major ones affecting the Flash player under Linux. As far as I can tell, the Linux and Windows Flash players both behave as expected.Note that I don't have a Mac, so I don't know if it works there (I don't know if SWT for that platform supports integration in Swing components)
The Webstart demo for Windows is up-to-date:
http://djproject.sourceforge.net/ns/DJNativeSwingDemo.jnlp
In case someone gets to test it, please let me know how it works for you!
-Christopher
IE crashes
Hi Christopher!The library looks great! I had some experience working with JDIC, but this looks by far better. There's one issue though I keep running into: sometimes IE crashes sayng: "javaw.exe has encountered a problem and needs to close..." - it's a standard windows dialog. I tried to narrow this down, but it's proving rather difficult. It looks like it's crashing when the browser window is somewhat small. I used the SimpleWebBrowserExample example, invoking it like following:
JFrame frame = new JFrame("Browser!");
frame.add(new Browser());
frame.setSize(400, 400);
frame.setVisible(true);
and it crashes each time. Then I change the size to 1000x1000 and it stops crashing.
I have IE7, so it might be just as well its problem - it's a well known bug magnet. I guess I was just wondering if you ever ran across anything like this...
thanks,
Dimitry