Devin.KR

javafx webview2

개발자 조회 2520

/*

 * To change this license header, choose License Headers in Project Properties.

 * To change this template file, choose Tools | Templates

 * and open the template in the editor.

 */

package javafxef;


import javafx.application.Application;

import javafx.scene.Scene;

import javafx.scene.layout.StackPane;

import javafx.scene.web.WebEngine;

import javafx.scene.web.WebView;

import javafx.stage.Stage;


/** @see http://stackoverflow.com/a/33824164/230513 */

public class WebViewPane extends Application {


    @Override

    public void start(Stage primaryStage) {

        StackPane root = new StackPane();

        WebView webView = new WebView();

        WebEngine webEngine = webView.getEngine();

        webEngine.load("https://wowpress.co.kr");

        root.getChildren().add(webView);

        Scene scene = new Scene(root);

        primaryStage.setTitle("WebView");

        

        primaryStage.setScene(scene);

       // primaryStage.setMaximized(true);

        primaryStage.setFullScreen(true);

        primaryStage.show();

    }


    public static void main(String[] args) {

        launch(args);

    }


}

댓글 0

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

댓글을 남기려면 로그인이 필요합니다.