楼主应该是大小写的问题吧
<applet code="shapeDemo",width=400 height=300></applet>
中code="ShapeDemo"

解决方案 »

  1.   

    下面就是出错信息
    ShapeDemo.java:6: cannot resolve symbol
    symbol  : class JApplet
    location: class ShapeDemo
    public class ShapeDemo extends JApplet
                                   ^
    ShapeDemo.java:11: incompatible types
    found   : java.awt.geom.Ellipse2D.Double
    required: Shape
            Shape shape1 = new Ellipse2D.Double(20.0, 45.0, 30.0, 30.);
                           ^
    ShapeDemo.java:12: incompatible types
    found   : java.awt.geom.Rectangle2D.Double
    required: Shape
            Shape shape2 = new Rectangle2D.Double(35.0, 35.0, 30.0, 30.0);
                           ^
    ShapeDemo.java:14: draw(java.awt.Shape) in java.awt.Graphics2D cannot be applied
     to (Shape)
            g2.draw(shape1);
              ^
    ShapeDemo.java:15: draw(java.awt.Shape) in java.awt.Graphics2D cannot be applied
     to (Shape)
            g2.draw(shape2);
              ^
    5 errors