swing - Java - Align JTextArea to the Right -



swing - Java - Align JTextArea to the Right -

i possible align text within jtextarea right (or alter text alignment in general)?

|left | | centered | | right| <-

i've been searching hours , seems others have asked question before there no answers (that work).

thanks in advance!

try jeditorpane or jtextpane instead of jtextarea.

please have @ post jeditorpane vertical aligment finish sample code.

for more info have @ thread vertical alignment of text in jeditorpane

sample code:

jtextpane output = new jtextpane(); simpleattributeset attribs = new simpleattributeset(); styleconstants.setalignment(attribs, styleconstants.align_right); output.setparagraphattributes(attribs, true); edit

you can try

jtextarea jtextarea = new jtextarea(); jtextarea.setcomponentorientation(componentorientation.right_to_left);

read more how set orientation of jtextarea right left

java swing alignment jtextarea

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -