File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Textarea Text Alignment?

 
Josh Tambini
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1535
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Indu Anand
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5116
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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'?
 
Indu Anand
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5116
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic