[英]How can we change language in JTextField?
運行時如何更改JTextField
的語言? 例如,我想輸入中文,因此必須更改鍵盤(Shift + alt)。
您可以使用InputContext.selectInputMethod
更改JTextField
使用的語言環境:
JTextField txt = new JTextField();
txt.getInputContext().selectInputMethod(Locale.CHINESE);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.