Align the contents of a JTextArea to the left

1

Hello! How could I align the content of a JTextArea to the left? I've tried with a

setAlignmentY(this.LEFT_ALIGNMENT);

But it seems not to work.

Thank you, best regards!

    
asked by user8797539 26.05.2018 в 10:47
source

1 answer

0

Try this:

jTextField.setHorizontalAlignment(JTextField.LEFT);
    
answered by 26.05.2018 в 12:29