import javafx.application.Application; import javafx.scene.layout.VBox; import javafx.scene.Scene; import javafx.stage.Stage; import javafx.scene.text.Text; import javafx.scene.text.Font; public class ThaiTextTest extends Application { // รวดเร็วกระโดดสีน้ำตาล static final String thaiStr1 = "\u0e23\u0e27\u0e14\u0e40\u0e23\u0e47\u0e27\u0e01\u0e23\u0e30\u0e42\u0e14\u0e14\u0e2a\u0e35\u0e19\u0e49\u0e33\u0e15\u0e32\u0e25"; // รวดเร็วกระโดดสีน้ำต static final String thaiStr2 = "\u0e23\u0e27\u0e14\u0e40\u0e23\u0e47\u0e27\u0e01\u0e23\u0e30\u0e42\u0e14\u0e14\u0e2a\u0e35\u0e19\u0e49\u0e33\u0e15"; public static void main(String[] args) { Application.launch(ThaiTextTest.class, args); } public void start(Stage stage) { VBox pane = new VBox(); Scene scene = new Scene(pane); stage.setScene(scene); Text text1 = new Text(30, 30, thaiStr1); Text text2 = new Text(30, 70, thaiStr2); text1.setFont(new Font(24)); text2.setFont(new Font(24)); pane.getChildren().addAll(text1, text2); stage.show(); } }