-
Notifications
You must be signed in to change notification settings - Fork 83
Description
I used Swingbox to build the code, but the Chinese characters were garbled.
- I am trying to use BrowserConfig to set the Asian font to be invalid
- My attempt to modify the custom charset is also invalid
Test Method:
`
BrowserConfig browserConfig=new BrowserConfig();
browserConfig.setDefaultFont(java.awt.Font.SANS_SERIF, "Arial");
browserConfig.registerDOMSource(DefaultDOMSource.class);
BrowserPane swingbox = new BrowserPane();
JTextField input = new JTextField("file:///F:/Person_workspace/note-single-html/single/demo/simple-local.html");
JButton text = ButtonFactory.primaryButton("测试");
text.addActionListener(e -> {
try {
swingbox.setPage(new URL(input.getText()));
} catch (IOException e1) {
e1.printStackTrace();
swingbox.setText("加载html错误!");
swingbox.repaint();
}
});
view.add(input, "grow");
view.add(text, "wrap");
view.add(new JScrollPane(swingbox), "span 2,grow");
simple-local.html Just a simple bootstrap example

