Java Swing文本框输入中文弹出输入窗口的解决


问题原因及解决方法:


原因:因为系统缺省的style属性是“below-the-spot” 所以会导致belowTheSpotInputRequested=true; 就会导致输入中文时出现小窗口。


解决方法:在main函数中System.setProperty("java.awt.im.style","on-the-spot");

你可能感兴趣的:(java,swing)