阅读背景:

使用DocumentFilter。使用unicode字符替换

来源:互联网 

I am building a GUI where one textfield must be typed in latin characters, the others in arabic. To avoid switching the keyboard layout, I choosed to maintain it in arabic and use a DocumentFilter in that particular textfield to replace arabic characters with their counterpart according to a latin azerty layout. Example, if one types '\u0628' (it is 'ب'), this should be printed 'F' because in they are in same key. This worked fine with all characters except with the B key, which translates into I am building a GUI where one textfield must be




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: