f



Right to left text area

Hi,

I have been trying to get right to left text working for a while now.  
What I want is a JTextArea, with my own very specific font (for a 
middle-eastern language that is RTL).  I have the TTF font, and I can 
get the JTextArea to type with this font.  I have even devised a way to 
map key strokes on the keyboard to the glyphs from the font that I want.

What I cannot figure out is how to make this text start and flow from 
the right to the left.  I have tried all variations of 
setComponentOrientation() and setAlignmentX().  I have even tried 
creating my own DefaultKeyTypedAction() that inserts the glyph I need 
and manually moves the cursor left, which I should not (theoretically) 
have to do.

I do not need BIDI in the text area, just RTL text, that wraps words at 
the left edge of the area.  Can't find the right way to do this 
anywhere.

Any ideas?

TIA,
Dimi



0
dimator (3)
2/8/2005 6:40:15 AM
comp.lang.java.programmer 52711 articles. 1 followers. Post Follow

1 Replies
433 Views

Similar Articles

[PageSpeed] 14

Try providing your own listener implementation and make delete all
text, append the new char to the left side of the string that was there
and insert it back into your text area.

Hope this helps,
Anton

0
toxa26 (11)
2/9/2005 2:05:08 AM
Reply: