• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Chinese text not displaying in JFileChooser

 
Jared Cope
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

When my Java application is run on a native chinese windows XP machine, the JfileChooser shows box characters anywhere that chinese characters appear. This includes the file names that you can choose, as well as the labels for buttons and fields.

I know that this is due to an incorrect font being used in the JFileChooser for displaying text, however using the .setFont() method on the JFileChooser with a good chinese font has had no effect. Any ideas?

Cheers, Jared.
 
Jared Cope
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Okay, this was actually due to using the JGoodies looks jar (version 1.2.2.jar) to set the global look and feel for the application. Appears that chinese characters aren't supported very well in that.

However, their latest version 2.0.1.jar has fixed it and works fine with chinese characters.

Cheers, Jared.
 
Zhongbo Li
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
打开文件对话框时,把显示风格设置为本地的风格,直接使用 Windows 的文件对话框,是一个很不错的办法。
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic