import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.stage.Stage; import javafx.scene.text.Text; import javafx.scene.text.TextAlignment; public class ComplexTextTest extends Application { static final String complextext = "\u0627\u0644\u062B\u0639\u0644\u0628 \u0627\u0644\u0628\u0646\u064A \u0627\u0644\u0633\u0631\u064A\u0639 \u064A\u0642\u0641\u0632 \u0641\u0648\u0642 \u0627\u0644\u0643\u0644\u0628 \u0627\u0644\u0643\u0633\u0648\u0644. \u0645\u0646\u0627\u0645\u0629 \u0627\u0644\u062D\u0631\u064A\u0631 \u0627\u0644\u0645\u0646\u0633\u0648\u062C\u0629 \u0644\u062A\u0628\u0627\u062F\u0644 \u0627\u0644\u0643\u0648\u0627\u0631\u062A\u0632 \u0627\u0644\u0623\u0632\u0631\u0642\u061F \u0644\u062F\u064A\u0647\u0645 \u0627\u062E\u062A\u064A\u0627\u0631: \u0639\u0634\u0631\u0648\u0646 \u0633\u062A \u0631\u0633\u0627\u0626\u0644 - \u0625\u062C\u0628\u0627\u0631 \u0623\u064A \u0645\u0633\u0627\u0628\u0642\u0629 \u0645\u062E\u062A\u0644\u0637\u0629!"; public static void main(String[] args) { Application.launch(ComplexTextTest.class, args); } public void start(Stage stage) { Group pane = new Group(); Scene scene = new Scene(pane, 900, 200); stage.setScene(scene); Text text1 = new Text(20, 30, complextext); text1.setTextAlignment(TextAlignment.RIGHT); Text text2 = new Text(260, 60, complextext); text2.setTextAlignment(TextAlignment.RIGHT); text2.setWrappingWidth(600); pane.getChildren().addAll(text1, text2); stage.show(); } }