0

How can I align the text in the textarea in java swing , is there a property for this and how ?...

M. Na.
  • 11
  • 7

1 Answers1

2

This should work out:

JTextArea jTextArea = new JTextArea();
jTextArea.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); 

(credit to Braj for this answer).

Also, this should give you more information: How to set the orientation of JTextArea from right to left (inside JOptionPane)

Community
  • 1
  • 1
brld
  • 188
  • 2
  • 16