aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Textarea Text Alignment? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Textarea Text Alignment?" Watch "Textarea Text Alignment?" New topic
Author

Textarea Text Alignment?

Josh Tambini
Greenhorn

Joined: Nov 30, 2004
Posts: 24
i want to text that is added into the text area to be : Right-To-Left.
and not "Left-To-Right" as the default is.

how do i do it by code?

10x
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
Indu Anand
Greenhorn

Joined: Jan 06, 2013
Posts: 7
bt Right To Left alignment gives a problem in numeric ...."if we have an ans -15 then it shows 15-" kindly give me suggestion to align my text at right in jtextarea() without giving this problem.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4642
    
    5

Indu Anand wrote:bt Right To Left alignment gives a problem in numeric ...."if we have an ans -15 then it shows 15-" kindly give me suggestion to align my text at right in jtextarea() without giving this problem.

This thread is about right-to-left alignment. Is that what you're looking for or do you just want right-aligned text that flows from left-to-right?

Oh, and the class is JTextArea, not jtextarea(). And what's 'bt'?


luck, db
There are no new questions, but there may be new answers.
Indu Anand
Greenhorn

Joined: Jan 06, 2013
Posts: 7
yes i just want a right-aligned text that flows from left-to-right in my textarea.yes dis is JTextArea(),i just wrote in flow.please give me the suggestion.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4642
    
    5

Use a JTextPane or a JEditorPane. JTextArea only supports plain text. Here are a couple of tutorials to get you started:
Using Text Components
How to Use Editor Panes and Text Panes
 
jQuery in Action, 2nd edition
 
subject: Textarea Text Alignment?