Here is the small source code:
package test;
import java.awt.*;
import java.awt.event.*;
class Test extends Frame implements WindowListener {
public static void main(String[] args) {
new Test();
}
Test() {
super("试验");
setLayout(new GridBagLayout());
GridBagConstraints grid = new GridBagConstraints();
grid.insets = new Insets(10, 10, 10, 10);
add(new Label("输入"), grid);
add(new TextField(20), grid);
addWindowListener(this);
pack();
setVisible(true);
}
public void windowOpened(WindowEvent event) {}
public void windowClosing(WindowEvent event) {System.exit(0);}
public void windowClosed(WindowEvent event) {}
public void windowIconified(WindowEvent event) {}
public void windowDeiconified(WindowEvent event) {}
public void windowActivated(WindowEvent event) {}
public void windowDeactivated(WindowEvent event) {}
}
Here is the application:

The title in Chinese is fine, and so is the Chinese input in TextField. But the Chinese Label is not displayed correctly. This is using java 9.0.4 in Windows 10. Can anyone tell me how to fix this?