试试g.setFont(new Font("Serif",32));

解决方案 »

  1.   

    不行啊: Wrong number of arguments in constructor.
    g.setFont(new Font("Serif",32));
      

  2.   

    g.setFont(new Font("Serif",Font.BOLD.32));
    BOLD后面应该是,号吧?
      

  3.   

    如果该成逗号 就会在Font.
                           ^这里出错:No variable BOLD defined in class Font.
      

  4.   

    import java.awt.*;
    public class  Zhiti
    {
    public static void main(String[] args) 
    {
    String[] f=GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
    for(int i=0;i<f.length;i++){
    System.out.println(f[i]);}
    }
    }
    这个程序能看出你的计算机有多少字体 你编译以下看有没有serif
    还是多看看书