WebView in JavaFX
WebView in JavaFX:
________________________________________________
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.VBox;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class JavaFXWebView extends Application {
@Override
public void start(Stage stage) {
WebView wView = new WebView();
wView.getEngine().load("https://www.google.com");
VBox vBox = new VBox(wView);
Scene scene = new Scene(vBox, 500, 500);
stage.setTitle("JavaFX WebView");
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
_____________________________________________
Dark Hers
YouTube
https://instagram.com/darkhers
https://www.facebook.com/darkhers
TikTok
https://www.tiktok.com/@darkhers
https://www.pinterest.co.uk/darkhers
Comments
Post a Comment