import java.awt.*;标签:10,12,setColor,200,Color,void,2022,100,public From: https://www.cnblogs.com/RUI2022/p/16971566.html
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);
}
}