FULL PRODUCT VERSION :
java version "1.7.0_06"
Java(TM) SE Runtime Environment (build 1.7.0_06-b24)
Java HotSpot(TM) 64-Bit Server VM (build 23.2-b09, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
When setting the windows Look and Feel, non-latin characters are not displayed in JComponents.
This only concerns the Windows L&F. With Metal and Nimbus, characters are correctly displayed.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run the attached program
2. Look out at the JFrame title
3. Look out at the JComponents text
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
1. A JFrame is displayed
2. The JFrame title displays the string "\u0e37name:th=\u0e37"
3. The JComponents display the string "\u0e37name:th=\u0e37"
ACTUAL -
1. OK
2. OK
3. KO: the JComponents do not show the first \u0e37 character. The last one is mixed with the '=' character.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
import javax.swing.*;
public class DialogTest {
public final static String string = "\u0e37name:th=\u0e37";
public static void main(String[] argv) {
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
final JFrame frame = new JFrame(string);
frame.setLayout(new GridLayout(3,1));
frame.add(new JLabel(string));
frame.add(new JTextField(string));
frame.add(new JButton(string));
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
}
---------- END SOURCE ----------