Use embedded web browser (e.g. Chrome) as GUI toolkit for Java desktop applications? [closed] Use embedded web browser (e.g. Chrome) as GUI toolkit for Java desktop applications? [closed] google-chrome google-chrome

Use embedded web browser (e.g. Chrome) as GUI toolkit for Java desktop applications? [closed]


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.


You should check out JavaFX 2.0. It allows you to specify GUI components in FXML, and supports CSS styling. It also has a "WebView" component that allows you to easily display web pages within an application.

EDIT 28th of November, 2015

The JavaFX Overview Section has moved.

As of JDK 7u6 JavaFX is included with the standard JDK and JRE bundles. Please download the JDK or JRE to use JavaFX.

If you are looking for the JavaFX Scene Builder download you will find it in the "Additional Resources" section of the main Java SE Download Page.

Please update your links to the new location.


One of the ways of utilizing HTML / JavaScript in desktop applications is embedding an HTML server in the application. Then a web page will be the GUI.It is literally a few dozens lines of code if you use

Example:simple HTTP server in Java using only Java SE API

Docs:http://docs.oracle.com/javase/7/docs/jre/api/net/httpserver/spec/com/sun/net/httpserver/package-summary.html

You need to serve the GUI web page from the web server (even on the localhost) to avoid JavaScript same origin policy conflict described here