当前位置: 技术问答>java相关
java GUI 达人乱入!!!我用Jb7将application打包成exe文件,运行没有问题,但是中文全变成口口口口, 求助!!!
来源: 互联网 发布时间:2015-10-10
本文导语: 问题如上: | jdk1.4缺省没用Dialog字体,在启动的开始执行下面的代码: javax.swing.plaf.FontUIResource defaultFontResource = new javax.swing.plaf.FontUIResource("Dialog", Font.PLAIN, 11); UIManager.put("Button.font", def...
问题如上:
|
jdk1.4缺省没用Dialog字体,在启动的开始执行下面的代码:
javax.swing.plaf.FontUIResource defaultFontResource = new javax.swing.plaf.FontUIResource("Dialog", Font.PLAIN, 11);
UIManager.put("Button.font", defaultFontResource);
UIManager.put("Label.font", defaultFontResource);
UIManager.put("RadioButton.font", defaultFontResource);
UIManager.put("CheckBox.font", defaultFontResource);
UIManager.put("ComboBox.font", defaultFontResource);
UIManager.put("List.font", defaultFontResource);
UIManager.put("MenuBar.font", defaultFontResource);
UIManager.put("MenuItem.font", defaultFontResource);
UIManager.put("RadioButtonMenuItem.font", defaultFontResource);
UIManager.put("CheckBoxMenuItem.font", defaultFontResource);
UIManager.put("Menu.font", defaultFontResource);
UIManager.put("PopupMenu.font", defaultFontResource);
UIManager.put("Panel.font", defaultFontResource);
UIManager.put("OptionPane.font", defaultFontResource);
UIManager.put("Panel.font", defaultFontResource);
UIManager.put("TabbedPane.font", defaultFontResource);
UIManager.put("Table.font", defaultFontResource);
UIManager.put("TableHeader.font", defaultFontResource);
UIManager.put("TitledBorder.font", defaultFontResource);
UIManager.put("ToolBar.font", defaultFontResource);
UIManager.put("TextPane.font", defaultFontResource);
javax.swing.plaf.FontUIResource defaultFontResource = new javax.swing.plaf.FontUIResource("Dialog", Font.PLAIN, 11);
UIManager.put("Button.font", defaultFontResource);
UIManager.put("Label.font", defaultFontResource);
UIManager.put("RadioButton.font", defaultFontResource);
UIManager.put("CheckBox.font", defaultFontResource);
UIManager.put("ComboBox.font", defaultFontResource);
UIManager.put("List.font", defaultFontResource);
UIManager.put("MenuBar.font", defaultFontResource);
UIManager.put("MenuItem.font", defaultFontResource);
UIManager.put("RadioButtonMenuItem.font", defaultFontResource);
UIManager.put("CheckBoxMenuItem.font", defaultFontResource);
UIManager.put("Menu.font", defaultFontResource);
UIManager.put("PopupMenu.font", defaultFontResource);
UIManager.put("Panel.font", defaultFontResource);
UIManager.put("OptionPane.font", defaultFontResource);
UIManager.put("Panel.font", defaultFontResource);
UIManager.put("TabbedPane.font", defaultFontResource);
UIManager.put("Table.font", defaultFontResource);
UIManager.put("TableHeader.font", defaultFontResource);
UIManager.put("TitledBorder.font", defaultFontResource);
UIManager.put("ToolBar.font", defaultFontResource);
UIManager.put("TextPane.font", defaultFontResource);
|
好象跟jdk有关系,换一个呢
|
开始设工程时,就让你选择字符集了。