首页 > 其他分享 >画笔案例-2022-12-10

画笔案例-2022-12-10

时间:2022-12-10 14:57:31浏览次数:62  
标签:10 12 setColor 200 Color void 2022 100 public

import java.awt.*;

public class testPaintDemo09 {
public static void main(String[] args) {
new myPaint().loadFrame();

}
}

class myPaint extends Frame {
public void loadFrame(){
setBounds(200,200,500,400);
setVisible(true);
}

public void paint(Graphics g) {
// super.paint(g);
g.setColor(Color.BLUE);
g.drawOval(100,100,100,100);
g.setColor(Color.GRAY);
g.fillOval(200,100,100,100);
g.setColor(Color.RED);
g.fillRect(200,200,200,100);
}
}

标签:10,12,setColor,200,Color,void,2022,100,public
From: https://www.cnblogs.com/RUI2022/p/16971566.html

相关文章