凡是方框的都是字体没设成中文字体,凡是问号的都是转码不对。终于找到最终解决问题的方法了。如下进行修改:
1、net.sf.hibernate.console.Start里增加函数:
    public static void setUIFont(javax.swing.plaf.FontUIResource f)
    {
        java.util.Enumeration keys = UIManager.getDefaults().keys();
        while(keys.hasMoreElements())
        {
            Object key = keys.nextElement();
            Object value = UIManager.get(key);
            if(value instanceof javax.swing.plaf.FontUIResource)
            {
                UIManager.put(key,f);
            }
        }
    }2、在main函数中调用
setUIFont(new javax.swing.plaf.FontUIResource("宋体",Font.PLAIN,12));3、编译,重新打包,运行,Good Luck

解决方案 »

  1.   


    http://blog.csdn.net/nickeyfff/archive/2004/11/26/194464.aspx 
      

  2.   

    在设计Application的时间我曾经为了统一设置字体都用过这个了,怎么就没有转过弯来如下:    setUIFont(new FontUIResource("宋体",Font.PLAIN,12));    public static void setUIFont(javax.swing.plaf.FontUIResource f)
        {
            //取得所有的缺省UIResource属性键。
            java.util.Enumeration keys = UIManager.getDefaults().keys();
            while(keys.hasMoreElements())
            {
                Object key = keys.nextElement();
                Object value = UIManager.get(key);
                //判断键值是否为FontUIResource,如果是则将其设为指定FontUIResource。
                if(value instanceof javax.swing.plaf.FontUIResource)
                {
                    UIManager.put(key,f);
                }
            }
        }
      

  3.   

    晕,没有看回复的时间吗?还不PIGO的回复的文章!!!
      

  4.   

    http://iamin.blogdriver.com/iamin/626060.html同时把net.sf.hibernate.console.highlighter.EditorDocument类中 
    构造方法的前三句注释掉 
    public EditorDocument(RETypes types){ 
    //Style defaultStyle = getStyle("default"); 
    //StyleConstants.setFontFamily(defaultStyle,"宋体"); 
    //StyleConstants.setFontSize(defaultStyle,12); 
    要不然在输出HQL语句时包含中文的仍是显示为框框:(