Question

I have Google Chrome Frame installed on my Windows XP + IE8 machine. When I navigate to chrome frame enabled page using IE8, it works. But when I navigate to the site through a Java application that uses DJ Native Swing, the add-on is not activated.

The application uses SWT version 3.740.

Is it possible enable Chrome Frame in the DJ Native Swing browser?

Was it helpful?

Solution 3

First, SWT control for Browser is what DJ Native Swing is using, but it also has all sorts of glue code to make it thread safe with Swing. Thus, changing to pure SWT would yield the same problems, plus threading issues to solve.

About Google Chrome Frame in SWT, and thus in DJ Native Swing, there is currently no support in SWT itself. See this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=317322

SWT, and DJ Native Swing, allow to create one's own ActiveX bridge. Maybe you could create your own component for Google Chrome Frame ActiveX on windows, similar to what DJ Native Swing does for the Windows Media Player component.

OTHER TIPS

Try imbedding WebKit layout engine with V8 JavaScript engine into Swing.

Getting Chrome Browser in java Applications

According to the documentation at JavaDoc: JWebBrowser it only supports IE and Mozilla:

A native web browser, using Internet Explorer or Mozilla on Windows, and Mozilla on other platforms.

However, according to the code it implements the "XULRunner Runtime" NSOption which according to The XULRunner Wikipedia article XULRunner appears in the credits for Chrome therefore it may suit your requirements to use Mozilla but it wont be Chrome.

The methods JWebBrowser.useWebkitRuntime() and JWebBrowser.useXULRunnerRuntime() seem to be the only built in options but you can use the NSOption class to define your own options if you know the correct variable names to pass.

I hope this helps

Last time in Swing project when we had to integrate browser into Swing application, we finally used Eclipse SWT component, that defaulted to IE. That made build for Windows only, but it worked, and eliminated some Swing bugs.

Try using Eclipse SWT control for browser.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top