import javafx.application.Application; import static javafx.application.Application.launch; import javafx.geometry.NodeOrientation; import javafx.scene.Scene; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; import javafx.scene.text.Text; import javafx.scene.text.TextFlow; import javafx.scene.control.CheckBox; import javafx.scene.control.DatePicker; import javafx.stage.Stage; public class TextFlowEmbeded extends Application { static String arabicString1 = "عرض"; static String arabicString2 = "اختبار"; public void start(Stage stage) { CheckBox embededCheckBox = new CheckBox(arabicString1); Text text = new Text(" " + arabicString2 + " "); DatePicker embededDatePicker = new DatePicker(); TextFlow textFlow = new TextFlow(embededCheckBox, text, embededDatePicker); CheckBox checkBoxInHBox = new CheckBox(arabicString1); Text textInHBox = new Text(" " + arabicString2 + " "); DatePicker datePickerInHBox = new DatePicker(); HBox hbox = new HBox(); hbox.getChildren().addAll(checkBoxInHBox, textInHBox, datePickerInHBox); VBox root = new VBox(); root.setSpacing(20); root.getChildren().addAll(textFlow, hbox); final Scene scene = new Scene(root, 300, 200); scene.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); stage.setScene(scene); stage.setTitle("TextFlow Test " + System.getProperty("javafx.runtime.version")); stage.show(); } public static void main(String[] args) { launch(args); } }