I am looking for an open source browser component like the ones in DJ Project (http://djproject.sourceforge.net/ns/index.html) for SWING. I tried using DJ Project (which I learned about from Best Java/Swing browser component?), but I noticed that it hasn't been updated in recent months.
If there is an easy way to make a web browser using JInternalFrame, that would be awesome as well.
Thank you in advance!
Related
I have an e4 application written in pure JavaFX, which you can see from my screenshot below.
I have two tabs, Test and ButtonView, I can drag and drop any of them in the main application window. However I find that I can't drag any of them out of the main window (or should it be called workbench in Eclipse application). So I'm wondering is there a way to make dragging window/view out of the main application window/workbench possible if I'm using pure JavaFX developing an e4 application?
You want to "detach" your view. I hope the following article helps you.
I've found a workaround from e(fx)clipse forum here. It is not supported in current release of e(fx)clipse (v2.4.0). We can achieve this by appending -Ddetachdrag.enabled=true to the VM parameter if we use the the latest nightly from head though.
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?
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
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.
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.
I'm going to embed Flex components into Java app, just embedding swf into JFrame. Does anybody know how to use EZ JCOM ? I don't know what is Flash COM or Flash ActiveX. please help me
Im working on a swing app that does exactly the same, i have a firefox instance embebbed on a swing app. For that iam using the following library, check it out The DJ Project
How can I put a swt.browser inside of a Jpanel?
There is SWTSwing, although it's not clear if it supports the Browser component.
If you're looking for a native browser in Java, the jdic project can render Internet Explorer into a swing component. See https://jdic.dev.java.net/documentation/incubator/JDICplus/index.html
Possibly more complete and current is the embedded browser support in NetBeans.
http://wiki.netbeans.org/EmbeddedBrowserPlan68
I have seen a lot of people try to make a web ui looks like a desktop ui. However, most of the time i feel web ui is much more interesting than the desktop ui, with the help of javascript toolkit like jquery, gwt-ext etc.
My question is, how to port the web ui to desktop ui? Do I need to embed a javascript engine in java? css engine? html layout engine? That sounds like a lot of work to do.
Any easy way of doing this?
you can embed a web server in your app and you can embed a browser inside your app window. i know eclipse does this pretty well. it uses SWT to do the heavy lifting
http://www.eclipse.org/swt/snippets/#browser
check the Browser section
your web server doesnt even have to be a proper web server, it just has to set the content, and can query / change it on the fly. the javascript on the page can even interact directly with your app.
you should be even able to use crazy web frameworks like
http://echo.nextapp.com/site/
or
http://code.google.com/webtoolkit/
or even run a ruby site through JRUBY
or make really complex apps using the new HTML5 engine [canvas/video tags] (if your client has the new mozilla installed)
Adobe AIR technology solves this exact problem. The code you develop using Flex can be rendered in the Flash player plugin of a browser or the same code can be easily packaged as a Desktop application that runs on the AIR runtime.
Have you seen Appcelerator's Titanium Desktop
This is one of the best solution for you (i think!)
You write the javascript and html code, and the titanium SDK creates the Desktop application of the same
There is support for Python and Ruby.
Must try :
http://www.appcelerator.com/products/titanium-desktop/
if you are a Ruby programmer then you must also see this
http://www.rubyinside.com/bowline-rails-for-the-desktop-2183.html
Prism from Mozilla is made for this goal, exactly. It's out of beta now too, I believe.
Check Google Gears y Adobe AIR
It not 'a lot of work to do', it's a huge amount of work to do - you would in effect be writing you own browser and it'd never come close to the poplar ones out there, simply because you wouldn't get the level of feedback something like Firefox gets.
If you're trying to avoid address bars, menu bars, etc these can be switched off in all the popular browsers and so to the user the appearance would be that it's more application like with only the rich content of the HTML visible.
Sounds like JavaFX would be good for you?
http://en.wikipedia.org/wiki/Javafx
Try XULRunner from Mozilla. If you have developed extensions for Firefox, then this is the exact same thing. XULRunner contains the Gecko engine, so it can render XUL and HTML with CSS, and it supports JavaScript with many useful XUL Components, like file read and write, directory browser and network tools.
Because it supports HTML you can in effect make a webpage and have it run like an application. Also it is cross platform, so it will run on Windows, Mac and Linux, anywhere Firefox runs actually.
There is some information on creating XULRunner applications on the net, but since it's so similar to making Firefox Extensions, you can just google for that. A good Tutorial for getting started is this one.