I have developed a JApplet (with JDeveloper 11g R1, Java 1.6.0_018) to display chinese characters. The problem is, some components, JLabel especially, won't display the proper chinese chars until the web-browser (both IE and Chrome, jre 1.6.0_026) is reloaded. Once reloaded, everything seems to display properly.
I tested the same JApplet as a standalone apps and there isn't such a problem. The chinese chars got displayed straight away.
I actually added the below into the JApplet's html file:
<param name="java_arguments" value="-Duser.language=zh -Duser.region=CN">
This param is put in place because in the future, other languages will be supported via the same method.
I have also added the below in my source code where m_locate=new Locale("zh", "CN"):
Just to find out why JLabels are not displaying chinese chars for the first time, I did a System.out of one of the JLabel's locale. When the JApplet is first initialized and loaded, I got the below:
Without doing anything, just simply reloading the page again, I got the below instead: