请问一下怎么可以去掉这个窗口

解决方案 »

  1.   

    http://www.matrix.org.cn/thread.shtml?topicId=44016&forumId=49上有人解答了这个问题,大家去看看
      

  2.   

    其实这个问题出在jre rt.jar 中的sun.awt.im.InputMethodContext类 
    该类中有个 private static boolean belowTheSpotInputRequested;属性  尝试用xjad反编译该类我们可以看到以下代码: 
    static 

    String s = (String)AccessController.doPrivileged(new GetPropertyAction("java.awt.im.style", null)); 
    if (s == null) 

    Toolkit.getDefaultToolkit(); 
    s = Toolkit.getProperty("java.awt.im.style", null); 

    belowTheSpotInputRequested = "below-the-spot".equals(s); 
    } 因为系统缺省的style属性是“below-the-spot” 所以会导致belowTheSpotInputRequested=true; 就会导致输入中文时出现小窗口 所以解决的办法 
    1.是在main函数中System.setProperty("java.awt.im.style","on-the-spot"); 
    2.将belowTheSpotInputRequested直接设置为false,编译后放入rt.jar中即可