O'Reilly logo

Java 9 Cookbook by Nick Samoylov, Mohamed Sanaulla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

The web-related APIs are available in the module, javafx.web, so we will have to require it in module-info:

module gui{
  requires javafx.controls;
  requires javafx.web;
  opens com.packt;
}

The following are the important classes in javafx.scene. web package when dealing with web pages in JavaFX:

  • WebView: This UI component uses WebEngine to manage the loading, rendering, and interaction with the web page
  • WebEngine: This is the main component that deals with loading and managing the web page
  • WebHistory: This records the web pages visited in the current WebEngine instance
  • WebEvent: These are the instances passed to the event handlers of WebEngine invoked by the JavaScript event

In our recipe, we make use of the first three classes. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required