Show website in Processing Java app

Hi,

I would like to show a website inside of my processing java app.
Is this possible?

Hi @LucaP,

Imho, short answer is no!
Long answer ā€¦
There are ways to hook into JFrame and add ie. a JEditorPane which displays the website, but only up to HTML3.2 which is imho not what you want and far from use the embedded website interactively.
There are also other libraries on the market based on Swing but it would be either licensed and/or needs a lot of background knowledge to other stuff and different for each OS.

Cheers
ā€” mnse

1 Like

Thank you.

We are fine paying for a libary.
Is there a possibility to use the javafx renderer and use the javafx webview?
Iā€™m not able to find how to access the scene processing runs in in order to overlay the javafx webview.

The following must be run in Processing 3.5.4. Current editor only has JavaFX renderer and not all the requisite libraries apparently.

// Must be run in Processing 3.5.4

import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.scene.layout.VBox;
import javafx.scene.web.WebView;

void setup() {  
  size(100, 100, FX2D);  // Creates default window in addition to one below.
  Stage stage = new Stage();
  stage.setTitle("JavaFX WebView Example");
  WebView webView = new WebView();
  webView.getEngine().load("http://google.com");
  VBox vBox = new VBox(webView);
  Scene scene = new Scene(vBox, 960, 600);
  stage.setScene(scene);
  stage.show();
}

void draw() {
}

More info here: https://discourse.processing.org/t/how-to-use-javafx-in-processing-4/35842

4 Likes

That wouldnt work with encryption would it?

No experience with encryption; others might know.