mport java.applet.Applet;
import java.awt.Graphics;
import java.awt.Color;
public class LX3_3 extends Applet {
public void paint(Graphics g) {
g.setColor(Color.red);//设置红颜色
g.drawOval(35,35,100,60);//画椭圆(圆心、宽和高)
g.fillOval(200,15,60,100);//画具有填充色的圆
g.setColor(Color.blue);//设置蓝颜色
g.drawRect(20,130,80,80);//画矩形
g.fillRect(120,130,80,80);//画具有填充色的矩形
}
}