Jlable.setFont方法,Jbutton也有
public void setFont(Font font)Sets the font for this component.
Overrides:
setFont in class Container

解决方案 »

  1.   

    jButton2.setFont(new java.awt.Font("Dialog", 1, 15));
      “dialog”代表字体,1代表样式(1是粗体,0是平常的)15是字号
      jlabel相同
      

  2.   

    有没有API可以在容器上设置一下,所有的JButton和JLabel都用相同的字体设置??
      

  3.   

    用JBuilder中的工具,很方便,为什么要用手写?
    Design中可以看看JBuildr生成的代码是如何写的。