使用嵌入式Web浏览器(例如Chrome)作为Java桌面应用程序的GUI工具包? [英] Use embedded web browser (e.g. Chrome) as GUI toolkit for Java desktop applications?
问题描述
我想知道:是否可以使用HTML5作为GUI工具包?我有一个库,它有一个类似于Swing或SWT的API,但是在HTML5中呈现。它应该是可变的,你应该可以访问Java中的页面(即Java和JavaScript / HTML5之间的一些融合)。
为什么不创建一个web应用程序并发送我的用户的URL?我想从Java SE应用程序的真正桌面集成(文件,COM,托盘图标等)中受益。就像PhoneGap一样,但是用于桌面操作系统而不是手机。
令人惊叹的是,我在网络上找不到像这样的东西。但也许我刚刚输入了错误的搜索条件?任何人都有想法?
如果不是的话:我可以以某种方式将WebKit / Chrome与我的应用程序一起嵌入吗?因此,用户不必安装自己的副本或更改任何设置。
/ p>
- Adobe Air ,它或多或少正是你要找的:PhoneGap for the desktop。 Chromium嵌入式框架,您只需付出一点努力就可以使用Chromium作为应用程序框架。
- Adobe Air, which is more or less exactly what you're looking for: PhoneGap for the desktop.
- Chromium Embedded Framework, which, with a little effort on your part, would allow you to use Chromium as the frame for an application.
Those HTML5 websites look great - why don't my Java desktop apps do? Swing and SWT are, well, just old-school. They do their job, but to create fancy looking GUIs with animation and everything is merely impossible.
I was wondering: Is it possible to use HTML5 as a GUI toolkit? I'm having a library in mind that has an API similar to Swing or SWT, but renders in HTML5. It should be themable and you should have access the the page in Java (i.e. some fusion between Java and JavaScript/HTML5).
Why not just create a web app and send my users the URL to it? I would like to benefit from real Desktop integration of Java SE apps (Files, COM, Tray Icon etc.). Just something like PhoneGap but for desktop OS'es instead of phones.
Stunningly I did find nothing like that on the web. But maybe I just entered the wrong search terms? Anyone have an idea?
Or if not: Can I somehow embed WebKit/Chrome together with my app? So the user won't have to install its own copy, or change any settings.
Two things come to mind:
这篇关于使用嵌入式Web浏览器(例如Chrome)作为Java桌面应用程序的GUI工具包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!