Alignment of Text not working on TextFlow
<p>I am new to javafx.</p>

<p>I am trying to build a messenger where the chatting panel show messages.
I want to align the messages like my own messages are on left and other messages are on right.</p>

<p>To display the message i am using TextFlow where I add Text. But the alignment isnt working.</p>

<pre><code>TextFLow tf=new TextFlow();
Text t1= new Text("Hi");
Text t2= new Text("Hello");
t1.setTextAlignment(TextAlignment.RIGHT);
t2.setTextAlignment(TextAlignment.LEFT);
tf.getChildren().addAll(t1,t2);
</code></pre>

<p>But the alignment not working. Both the text are on left.
What should I do?</p>