Swing components and weird bidirectional text handling

A

Andrea Desole

I have a weird bug to solve.
If I copy and paste in a JTextField the following string (hope you can
see it):

قكطABC

it shows correctly. However, when the same string is added to a JList,
it's shown as:

ABCقكط

which is not what I want. This is because the text is a mixture of
Arabic (right to left) and Western (left ro right).
According to this bug:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4701238

the component doing the things correctly is the JList, and not the
JTextField.
Now, why is the JList correct? If I write Arabic on the left and Western
on the right it means that I want it that way. Why is the list changing
it? Can I prevent the list from changing?
Also, how can I have at least a consistent behavior? Using Ctrl-Shift-O
as described in the bug report doesn't seem to help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top