Cannot display Chinese char in JButton

Hi,

I run a java application in Windows connecting to two servers, one is on WAS6 Cluster and the other is on WAS6 stand alone. The text displayed in JButton is depend on locale(e.g. I use "FileChooser.openButtonText" as "Open").

When I set the locale to English, then connect to the two servers, the "Open" in JButton can be displayed. But when I set the locale to Chinese, then connect to WAS6 stand alone display the Chinese char in JButton successful, but display two suqare boxes in JButton connecting to WAS cluster.

I cannot belive the server side has anything to do with the text display, but I use the same Windows2003 machine and get two different reslut. I also test it on Windows2000(works well) and Window XP(the same situation as Windows2003).

Any help will be appreciate, thanks.

[825 byte] By [Spark_Honga] at [2007-10-3 3:24:48]
# 1
If you comment out the server access part of the code, what would be the result on the JButton in question?
hiwaa at 2007-7-14 21:17:38 > top of Java-index,Desktop,Core GUI APIs...
# 2

I'm not sure if there is any difference between the two servers' environment, but they deployed the same EAR files.

I don't have debug environment in Windows XP or 2003, so I can't do what you suggest now. The part of the code in client are like:

btnOpen.setText(UIConstants.openButtonText);

btnOpen.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) { doOpen(); }

});

public interface UIConstants

{

public static final intDEFAULT_ROW_HEIGHT= 22;

public static final StringokButtonText= UIManager.getString("OptionPane.okButtonText");

public static final StringcancelButtonText= UIManager.getString("OptionPane.cancelButtonText");

public static final StringyesButtonText= UIManager.getString("OptionPane.yesButtonText");

public static final StringnoButtonText= UIManager.getString("OptionPane.noButtonText");

public static final StringopenButtonText= UIManager.getString("FileChooser.openButtonText");

.....

}

Thanks for your suggestion, do you have any other ideas?

Spark_Honga at 2007-7-14 21:17:38 > top of Java-index,Desktop,Core GUI APIs...
# 3
Anyone who can help me?
Spark_Honga at 2007-7-14 21:17:38 > top of Java-index,Desktop,Core GUI APIs...
# 4
You didn't show the relevant part.Server, or server accessing part, directly or indirectly, should be fiddling with lolcale or encoding.
hiwaa at 2007-7-14 21:17:38 > top of Java-index,Desktop,Core GUI APIs...