What's out there that lets you do this? Are there any OSS projects or maybe something a little more popular than this: http://www.jpackages.com/jflashplayer/ ? This does exactly what I'm suggesting (i.e. cuts out the need for Swing UI for the most part) but for a number of reasons I'd be interested in any better alternatives. Are there any? Any alternatives would need to support the Flex SDK.
Use the SWT GUI toolkit, which has an embedded browser. You can even deploy you own webkit with it, and let flash run in this browser, so you are platform independent, and don't rely on native browsers.
It will however be a large deployment, because of the browsers size.
EDIT: You can also emed the Flash ActiveX control directly in an SWT composite (Composite is the JPanel of SWT)
JavaFX 2 has a web control. I can't remember if the beta can do flash yet or if still upcoming. But if it doesn't support flash yet then it probably will soon, they release updates every 2 or so weeks to test.
You could also try the JFlashPlayer from DJ Native Swing: http://djproject.sourceforge.net/ns
It is essentially the SWT Browser, but with all sorts of integration headaches solved, and proper API.
Related
I've heard rumors of people creating their own custom libraries for one, but I have yet to find one for myself. I need it because I need to mount another running applet (in a JPanel in Swing) for my application.
No, at least not in an officially supported way.
There is the SwingView in the ThingsFX 3rd party library to do this.
I've never tried it, so I can't recommend for or against it.
ThingsFX has a website.
Here is a screenshot of Swing components rendered on a JavaFX Stage using ThingsFX.
I have to find technology for new desktop application on Java only.
I don't want use swing, but I can't find good and perspective alternatives.
I know about JavaFX, but I have strong requirements: It must look good, not roughly on linux, windows and macOx. Does JavaFX work fine on each of this platforms? And which a big troubles can I find in using JavaFX?
I'm using FX in desktop development. It's great, but far away from being perfect. Also there's no Linux version at this moment, as for Mac, it's only beta 2.1 (which i'm using right now). The biggest thing that annoys me is freezes. U can download visual editor right here
BTW Gosling belives that FX would become more usefull in desktop dev than in RIA development
Eclipse's SWT should definitely be considered. It supports all three platforms mentioned and IMO is nicer to use than Swing.
I know this can be a bit of weird question, but let me explain the idea behind it first.
I have a win32 app exposed a an Activex host, this gives me the the following useful features:
Embed and call it from Internet Explorer as a simple to pass/return values from it using javascript.
Embed and call it from any win32 application made in languages like visual basic, c++, delphi etc. Even i can call it from MS office products like excel and word.
I have been asked to migrate this app to Java SWT but i donĀ“t know if it can be done without losing the mentioned capabilites, the only way could be to expose the app itself as an Activex host, can this be possible?.
Thanks a lot.
I have no experience with ActiveX, but a lot of examples are in snippets folder at SWT homepage. Try to check them..
If you migrate your app to Java SWT then you will lose the desired functionality of using in IE and as well as in other MS product based on COM or ActivX technology. Although one crude way could be to use some bi-directional COM broker like Jacob.
If given a choice then I will utilize the SWT's in-built support for COM and will try to embed your activex component in my swt application. For example, you can look at:
org.eclipse.swt.browser.IE -- Allows access to IE ActiveX component in the form SWT browser control.
org.eclipse.compare.internal.win32.WordComparison this is a part of eclipse's file diff plugin. The class is very nicely written and gives a COM flavored snippet of diffing two MS word files.
In this way I can have the activex intact for whatever purposes.
There is this article on adding activex support to swt without using any third party COM bridge
I recently played around with the SWT browser widget (which is great). I am wondering if I could write a full desktop application with it (with java services behind - e.g. persistence) and what drawbacks I would have to consider. The advantage would be that people without java knowledge could work on the gui. Of course it depends on the requirements and I know that this is not a very specific question. But mabye someone already tried to build a bigger app this way and is willing to share insights.
Thanks
Marcel
I'm not sure I share your opinion of the SWT browser widget. AFAIK it's merely a shell into the default browser on your machine, merely with a few API access points. I've used it for minor things when I needed to show a web page from within the application. But writing a whole application? That doesn't make sense.
If you want to build a web-based application that runs in the browser against a Java based server framework, there are many AJAXian frameworks to do it. You'd still be doing JavaScript for your client code. And you'd still be dealing with all the complexities of different browsers. I'm not sure why you would want to host it inside an SWT application instead of just directly in the browser window.
Is there a way to display a Flash or Adobe Reader ActiveX control in a Java AWT frame?
I'm porting a large old J++ application to standard Java and it needs to host a certain ActiveX control on an AWT frame.
Is this possible?
I looked at the JACOB (Java to COM Bridge) project and it doesn't appear to support ActiveX objects that draw on the screen.
It looks like this can be done by mixing AWT and SWT.
The Eclipse project has a sample snippet that embeds Microsoft Word into an AWT/SWT mixed app.
It appears that you will need to purchase a proprietary library in order to able to do this, as Java itself doesn't allow access to COM. Another similar question (about just Flash in Java) can be found here and a couple commercial solutions were listed.
I should note that whatever route you end up taking, you should optimally try to find a library that provides access to an Internet Explorer control, as opposed to just Flash or Adobe Reader. That's because, once you have access to an IE element, you can provide it with a URL (even if it's a local file) of either a .swf or .pdf document, and it will automatically load the correct plugin for each (I used this shortcut once for a personal C++ project in which I needed to load several different ActiveX controls). It appears that the EasyJCom library at the above link does provide such access to an embedded IE control.