import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

public class Test  extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) throws Exception {
        var textArea = new TextArea();
        textArea.setOnInputMethodTextChanged(e -> {
            System.out.println("Event:" + e.getCommitted().length());
            textArea.appendText(e.getCommitted());
        });
        VBox.setVgrow(textArea, Priority.ALWAYS);
        var root = new VBox(textArea);
        var scene = new Scene(root, 400, 400);
        primaryStage.setScene(scene);
        primaryStage.show();
    }
}