I want to use toUpperCase() for a set of JButtons. These buttons are added to a JPanel, which is added to a JDialog. The buttons' texts are pinyin sepcial characters. The problem is, that toUpperCase relies on the set Locale and doesn't know the UpperCase versions of these characters and thus doesn't change them at all.
I used this command:
button.setText(button.getText().toUpperCase());
(I know that toUpperCase doesn't change the String itself) Since the buttons text is a pinyin special character, it doesn't change it.
Which Locale do I need to set? I already tried ROOT, CHINA, CHINESE, new Locale("LATIN"), and others, but none helped the toUpperCase method to work.
Pinyin special characters: āáǎà the same with e,i,o,u and ü.
I could also exchange all the buttons with other buttons, but it would be better I think, to simply change the case of the texts if that is possible. When the user clicks one of the buttons I simply want to take the button text and add it in a JTextfield.