Java学习——Applet写字符串(调字体)

 

import java.awt.*;
import java.applet.Applet;

public class GUI2 extends Applet{
    
    public void paint(Graphics g) {
        g.setFont(new Font("黑体",Font.PLAIN,24));
        g.drawString("蔡军帅",25,35);
        g.setFont(new Font("宋体",Font.BOLD + Font.ITALIC,16));
        g.drawString("17信息1", 25, 60);
        g.drawString("170102019101", 25, 85);
            
    }
}

 

posted on 2018-12-10 23:26  蔡军帅  阅读(681)  评论(0编辑  收藏  举报