You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Math_Learning/AppLauncher.java

30 lines
1.2 KiB

package View;
import javax.swing.*;
import Service.Exam_service;
import Service.User_service;
public class AppLauncher {
public static void main(String[] args) {
// 设置中文显示
setUIFont();
SwingUtilities.invokeLater(() -> {
MainFrame frame = new MainFrame();
frame.setVisible(true);
});
}
private static void setUIFont() {
try {
UIManager.put("Button.font", new javax.swing.plaf.FontUIResource("微软雅黑", java.awt.Font.PLAIN, 13));
UIManager.put("Label.font", new javax.swing.plaf.FontUIResource("微软雅黑", java.awt.Font.PLAIN, 13));
UIManager.put("TextField.font", new javax.swing.plaf.FontUIResource("微软雅黑", java.awt.Font.PLAIN, 13));
UIManager.put("PasswordField.font", new javax.swing.plaf.FontUIResource("微软雅黑", java.awt.Font.PLAIN, 13));
UIManager.put("TextArea.font", new javax.swing.plaf.FontUIResource("微软雅黑", java.awt.Font.PLAIN, 13));
UIManager.put("RadioButton.font", new javax.swing.plaf.FontUIResource("微软雅黑", java.awt.Font.PLAIN, 13));
} catch (Exception e) {
e.printStackTrace();
}
}
}