Adding HTML Content to JavaFX Applications
Beta Draft: 2013-09-17
About This Tutorial
This tutorial introduces the JavaFX embedded browser, a user interface component that provides a web viewer and full browsing functionality through its API. The document contains the following chapters:
-
Describes the new and changed features in the current release.
-
Overview of the JavaFX WebView Component
Lists the basic features of the
WebView
component and introduces classes of thejavafx.scene.web
package. -
Describes the HTML5 features supported by the
WebView
component. -
Adding a WebView Component to the Application Scene
Provides instructions on how to embed a browser based in the WebView component into the application scene.
-
Processing JavaScript Commands
Explains how to run a particular JavaScript command for the document currently loaded into the browser.
-
Making Upcalls from JavaScript to JavaFX
Provides instructions on how to implement calling from web content to JavaFX application.
-
Teaches how to use the
PopupFeatures
class to set an alternativeWebView
object for the documents that will be opened in a separate window. -
Explains how to obtain the list of visited pages by using the
WebHistory
class. -
Provides a code pattern for printing HTML content of the embedded browser.
This tutorial provides the WebViewSample application so that you better learn the features described in each chapter. By the end of your study, you will have the complete version of the WebViewSample application with all functional code fragment integrated.
You can also find the source files of the application and the corresponding NetBeans project in the Application Files section.