6.画笔
作者:互联网
1.画笔
import java.awt.*;
public class Dome1 {
public static void main(String[] args) {
new Mypaint().LoadFram();
}
}
class Mypaint extends Frame {
//创建窗口
public void LoadFram() {
setBackground(Color.white);
setBounds(500, 500, 500, 500);
setVisible(true);
}
//画笔
@Override
public void paint(Graphics g) {
g.setColor(Color.red);//设置画笔颜色
g.fillOval(50,50,400,400);//一个填充原圆形
}
}
标签:画笔,void,public,400,LoadFram,500 来源: https://www.cnblogs.com/lyq888/p/16086920.html