简体   繁体   中英

Applet not iitialized when using Java Applet view

I just finished my first programming class and did well in it and decided to start doing some graphics stuff from the book. The code complies fine then when ran in the applet viewer it says Start: Applet not initialized

import javax.swing.JApplet;
import java.awt.*;
/* <applet code = "test" width = 700 height = 700> </applet> */
public class HappyFace extends JApplet
{
  public void paint(Graphics canvas)
  {
   canvas.drawOval(100, 50, 200, 200);
   canvas.fillOval(155, 100, 10, 20);
   canvas.fillOval(230, 100, 10, 20);
   canvas.drawArc(150, 160, 100, 50, 180, 180);
  }
}

这个类叫做HappyFacetest

<applet code="HappyFace" width = 700 height = 700> </applet>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM