Load font.properties.ja file

Hi,

Our swing application will be using in Japan so we require to display Japanese character and we are applying "Internationalization" in our design. I have already install the Japanese font in my XP System for testing purpose.

Now while I am trying to show Unicode character (Japanese), it only works if I replace thefont.properties file withfont.properties.ja file.

The following is sample class that I have used:

publicclass JapaneseCharacterFrameextends JFrame{

public JapaneseCharacterFrame(){

super("\u30d7\u30e9");

JLabel label =new JLabel("\u30d7\u30e9");

this.getContentPane().add(label);

this.setSize(300, 200);

this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

this.setVisible(true);

}

publicstaticvoid main(String[] args){

Locale.setDefault(Locale.JAPAN);

TimeZone.setDefault(TimeZone.getTimeZone("Asia/Tokyo"));

new JapaneseCharacterFrame();

}

}

As you can see, I am setting up theTimeZone andLocale to Japan but it doesn't work if I don't do the replace. But the japanese charcter properly appears on the Title bar but on in the JLabel.

How do I load the font.properties.ja file without rename it?

What I am missing my test class?

5 Duke point for who ever can help me out.

P.S. We are using JDK 1.4.XX_XX.

Thanks

Duke (My real name).

[2076 byte] By [Digerati.Duke.007a] at [2007-11-26 12:40:09]
# 1
http://www.flex-compiler.lcs.mit.edu/jdk/guide/intl/fontprop.html shows the renaming of font.properties method that you described, but it also has a part called "Using Multiple Fonts in the Runtime" which doesn't rename the file.Hope this helps~ericode
ericodea at 2007-7-7 16:11:12 > top of Java-index,Java Essentials,Java Programming...
# 2

Hi Ericode,

Thanks for you feedback. I have seen that documents of explanation before I post this topics. That documentation is really for JDK 1.1 version and I am hoping that has changed in later version. Because that's basically is replacing the font.properties file (or manipulate that) and that's what I don't want to do.

Funny thing is, the Japanese characters are appearing on the Title bar but not on the Label with the regular font.properties file and that's what I really want to know why not?

Thank you for your feedback again..

Duke.

Digerati.Duke.007a at 2007-7-7 16:11:12 > top of Java-index,Java Essentials,Java Programming...
# 3
I just tested with 1.5 and it works without manipulating the font.properties file (doen't even require to set the timezone and Locale). Not sure what need to be done in 1.4...
Digerati.Duke.007a at 2007-7-7 16:11:12 > top of Java-index,Java Essentials,Java Programming...