@FXML
void openCaptchaSolver(MouseEvent event) {
Stage primaryStage = (Stage)((Node)event.getSource()).getScene().getWindow();
Stage secondaryStage = new Stage();
WebView web = new WebView();
WebEngine engine = web.getEngine();
engine.load("https://www.google.com");
VBox root = new VBox();
root.getChildren().addAll(web);
secondaryStage.setScene(new Scene(root, 500, 575));
secondaryStage.setTitle("Secondary Stage");
secondaryStage.show();
}
I'm trying to get started with WebView's in JavaFX but when trying to open one I'm receiving the errors shown below, how would I go about fixing this issue?
Caused by: java.lang.IllegalAccessError: superclass access check failed: class com.sun.javafx.sg.prism.web.NGWebView (in unnamed module @0x6b0c2d26) cannot access class com.sun.javafx.sg.prism.NGGroup (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.sg.prism to unnamed module @0x6b0c2d26