在java中更改输入语言 [英] Change input language in java

查看:127
本文介绍了在java中更改输入语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的申请是希伯来语。
运行我的应用程序的计算机都将英语设置为默认语言,希伯来语作为辅助语言。

My application is in Hebrew. The computers that are running my app all have English set as the default language and Hebrew as the secondary language.

每次他们需要输入内容到我的JTextFields,他们必须alt + shift来改变语言,
他们中的一些人甚至不看显示器而只是开始写作,我得到了胡言乱语,因为他们用希伯来语写但是用英语字符:)

Every time they need to input stuff to my JTextFields, they have to "alt + shift" to change language, Some of them don't even look at the monitor and just begin to write, and I get gibberish because they wrote in Hebrew but with English chars :)

是否有可能在JTextFields获得焦点时设置语言,或者以其他方式设置语言?

Is it possible to set the language when a JTextFields gets the focus , or maybe in some other way ?

谢谢,

戴夫

推荐答案

尝试 jTextField.getInputContext()。selectInputMethod(新语言环境(iw,IL)); on FocusGained 事件

这篇关于在java中更改输入语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆