开始:小程序未在Eclipse中初始化错误

时间:2019-05-23 01:34:47

标签: java applet

尝试运行小程序时找不到类文件错误

    package chapter1;

    import java.awt.*;
    import javax.swing.*;

    public class CircleInSquare extends JApplet
    {
        public void paint(Graphics graphics)
        {
            final int X = 50, Y = 50, SIZE = 50;

            graphics.setColor(Color.BLACK);
            graphics.fillRect(X, Y, SIZE, SIZE);
            graphics.setColor(Color.WHITE);
            graphics.fillOval(X, Y, SIZE, SIZE);
        }
    }

我尝试从命令行运行appletviewer并获得相同的结果

0 个答案:

没有答案