• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Textarea Text Alignment?

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic