Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Change text field entry language programatically  RSS feed

 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings,
Here is a grossly simplified description of my situation:
I have a text field and (for example) two buttons.
When clicking on one button, the entry language of the text field becomes English.
When clicking on the second button, the entry language becomes Arabic.
For simplicity, let's assume that clicking on a button also clears the contents of the text field.
How can I achieve changing of the entry language when clicking on the button?

Thanks,
Avi.
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doesn't setText do what you want? If not, perhaps using setLocale first will help.
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply, Rob.
Perhaps my explanation of my problem is unclear.
Upon launching the GUI, the text field is empty.
The user clicks on the button for setting the language to Arabic.
Then, when the user types text into the text field, it is Arabic text.
Then the user clicks on the button for setting the text to English.
Now, when the user types text into the text field, it is in English.
Hope this makes my question clearer now.

Thanks,
Avi.
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, so you need to change the keyboard settings themselves. You'll need JNI for that unfortunately.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!