AboutArtemus Harper Expertise I have a BS in computer science and am working towards a Masters degree.
Experience I have experience in Core Java, good background in Java swing/gui, some experience with JNI, Java reflection, and Java java.nio.*
knowledge of Java bytecode and annotations.
Basics in c++ and c#
Question Hello,
i would like to display an Arabic (Unicode) String of characters (enter by user in Jtextarea) from left to right.
NB: I use java netbeans as IDE.
Thank you so match.
Answer In the pre init code of the component you can set the orientation to left to right overriding the language default (right to left for Arabic)
In the post-init code for the text area add:
setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
also make sure that java.awt.ComponentOrientation is added as an import in the code.
This is all you should need to do as long as a font with Arabic is available... you might want to make sure the font is set to one that has Arabic symbols. This should not be a problem on an Arabic OS. If this is not the case you might want to include a font with your application.