This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Chinese text not displaying in JFileChooser  RSS feed

 
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.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
打开文件对话框时,把显示风格设置为本地的风格,直接使用 Windows 的文件对话框,是一个很不错的办法。
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!