/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package felipe; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.layout.VBox; import javafx.scene.text.Font; import javafx.scene.text.Text; import javafx.scene.web.WebView; import javafx.stage.Stage; /** * */ public class RT25608 extends Application { public static void main(String[] args) { Application.launch(args); } public void start(Stage stage) throws Exception { String arabicSample = "Arabic: He said \u0627\u0644\u0633\u0644\u0627\u0645 \u0639\u0644\u064a\u0643\u0645 to me."; String hebrewSample = "Hebrew: \u05d1\u05d2\u05d3\u05d4 (\u05d1\u05d2\u05d3 DEF) \u05d1\u05d2\u05d3\u05d4\u05d5 GHI"; String hindiSample = "Hindi: \u091a\u093f\u0932\u094d\u0932\u0939\u091f"; String thaiSample = "Thai: \u0E19\u0E49\u0E33 \u0E23\u0E30\u0E40\u0E2A\u0E23\u0E34\u0E10"; WebView webView = new WebView(); StringBuffer content = new StringBuffer(); content.append(""); content.append(""); content.append(""); content.append(""); content.append("
"); content.append(arabicSample); content.append("
"); content.append("
"); content.append(hebrewSample); content.append("
"); content.append("
"); content.append(hindiSample); content.append("
"); content.append("
"); content.append(thaiSample); content.append("
"); content.append(""); content.append(""); webView.getEngine().loadContent(content.toString()); Font font = new Font("System", 26); Text arText = new Text(arabicSample); Text heText = new Text(hebrewSample); Text hiText = new Text(hindiSample); Text thText = new Text(thaiSample); arText.setFont(font); heText.setFont(font); hiText.setFont(font); thText.setFont(font); VBox box = new VBox(4); box.getChildren().addAll(webView, arText, heText, hiText, thText); Scene scene = new Scene(box, 600, 600); stage.setTitle("WebView Test"); stage.setScene(scene); stage.show(); } }