How to Change Font Size in drawString Java

前端 未结 6 1696
清歌不尽
清歌不尽 2021-02-02 07:33

How to make the font size bigger in g.drawString(\"Hello World\",10,10); ?

6条回答
  •  星月不相逢
    2021-02-02 07:57

    code example below:

    g.setFont(new Font("TimesRoman", Font.PLAIN, 30));
    g.drawString("Welcome to the Java Applet", 20 , 20);
    

提交回复
热议问题