使用嵌入式Web浏览器(例如Chrome)作为Java桌面应用程序的GUI工具包? [英] Use embedded web browser (e.g. Chrome) as GUI toolkit for Java desktop applications?

查看:682
本文介绍了使用嵌入式Web浏览器(例如Chrome)作为Java桌面应用程序的GUI工具包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这些HTML5网站看起来不错 - 为什么我的Java桌面应用程序没有? Swing和SWT都只是老派。他们完成他们的工作,但创建看起来有动画效果的图形用户界面,一切都是不可能的。



我想知道:是否可以使用HTML5作为GUI工具包?我有一个库,它有一个类似于Swing或SWT的API,但是在HTML5中呈现。它应该是可变的,你应该可以访问Java中的页面(即Java和JavaScript / HTML5之间的一些融合)。



为什么不创建一个web应用程序并发送我的用户的URL?我想从Java SE应用程序的真正桌面集成(文件,COM,托盘图标等)中受益。就像PhoneGap一样,但是用于桌面操作系统而不是手机。



令人惊叹的是,我在网络上找不到像这样的东西。但也许我刚刚输入了错误的搜索条件?任何人都有想法?



如果不是的话:我可以以某种方式将WebKit / Chrome与我的应用程序一起嵌入吗?因此,用户不必安装自己的副本或更改任何设置。

解决方案

/ p>


  • Adob​​e Air ,它或多或少正是你要找的:PhoneGap for the desktop。
  • Chromium嵌入式框架,您只需付出一点努力就可以使用Chromium作为应用程序框架。

      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:

      • 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.

      这篇关于使用嵌入式Web浏览器(例如Chrome)作为Java桌面应用程序的GUI工具包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆