3

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?

Peter O.
  • 32,158
  • 14
  • 82
  • 96
nilgun
  • 10,460
  • 4
  • 46
  • 57

4 Answers4

1

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

Getting Chrome Browser in java Applications

Community
  • 1
  • 1
Paul Verest
  • 60,022
  • 51
  • 208
  • 332
1

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

Skepi
  • 478
  • 3
  • 12
  • Yes, I see, I cant get Chrome work with DJ Native Swing, therefore I am trying to make it work with the Chrome Frame add-on. Also I dont want to assume the clients of my program have Chrome installed on their computers, but I can assume IE is installed and Frame add-on can easily be installed by visiting www.google.com/chromeframe. – nilgun Mar 27 '13 at 08:07
  • I have no idea on what kind of variable name & value to pass to DJ Native Swing to enable the chrome frame plugin. Can you suggest any links or code ? – nilgun Mar 27 '13 at 08:08
  • Sorry, looked through and I have nothing – Skepi Apr 02 '13 at 08:48
0

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.

Paul Verest
  • 60,022
  • 51
  • 208
  • 332
  • This answer suggest that you don't use Google Chrome Frame. Google Chrome Frame is a way of running Microsoft Internet Explorer (IE) inside Chrome. But you can use other ways to do that. Currently all widgets toolkits have WebView widget, that is actually platform built-it browser. – Paul Verest Mar 26 '13 at 14:24
  • 1
    I disagree with your statement of : "Google Chrome Frame is a way of running Microsoft Internet Explorer (IE) inside Chrome". I think it should be "Google Chrome Frame is a way of running Chrome Javascript engine inside Microsoft Internet Explorer (IE)". It works on IE. – nilgun Mar 26 '13 at 14:46
  • From the beginning this thread lacks links. Yes you are right. http://en.wikipedia.org/wiki/Google_Chrome_Frame "Google Chrome Frame is a plug-in designed for Internet Explorer" – Paul Verest Mar 26 '13 at 14:50
  • I guess when you are using Swing it opens browser with all plugins disabled, that is the reason, that it doesn't work. – Paul Verest Mar 26 '13 at 14:52
0

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.