import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

public class TestApp extends Application {
    @Override
    public void start(Stage primaryStage) {
        String text = "Arabic:العربية:Arabic:العربية";
        
        Label instructions = new Label("Try to place the caret at boundaries between Arabic and English words (after colons) to observe caret rendering.");

        TextField textField = new TextField(text);
        textField.setPrefColumnCount(40);

        VBox root = new VBox(10, instructions, textField);
        Scene scene = new Scene(root, 600, 100);
        primaryStage.setTitle("JavaFX Mixed RTL/LTR Caret Demo");
        primaryStage.setScene(scene);
        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}