两种方式:

 

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));
}

 
 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-12
  • 2021-05-10
  • 2021-09-14
  • 2022-01-01
  • 2021-10-14
  • 2021-05-31
猜你喜欢
  • 2021-04-18
  • 2021-05-18
  • 2021-04-23
  • 2022-12-23
  • 2021-05-08
  • 2021-05-09
  • 2022-12-23
相关资源
相似解决方案