两种方式:
1、
UIManager.put("Button.font", new Font("MS UI Gothic", Font.PLAIN, 24));
UIManager.put("Label.font", new Font("MS UI Gothic", Font.PLAIN, 24));
2、
Component[] comp=this.getComponents();
for(Component cp:comp){
cp.setFont(new Font("MS UI Gothic", Font.PLAIN, 24));
}
时间: 2024-10-15 04:50:08