0

Class file not found error when trying to run the 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);
        }
    }

I've tried running the appletviewer from the command line and get the same results

Tom Magaro
  • 181
  • 3
  • 13
  • It is 2019, applets are dead. **Really** dead. Exactly how are you running the appletviewer? – Elliott Frisch May 23 '19 at 01:44
  • Applets are obsolete and most browsers no longer support them. – WJS May 23 '19 at 01:44
  • Yeah, I'm working out of book that uses version 5. What has replaced applets? – Tom Magaro May 23 '19 at 02:00
  • Read [this](https://blogs.oracle.com/java-platform-group/the-future-of-javafx-and-other-java-client-roadmap-updates) and [*Java Client Roadmap Update*](https://www.oracle.com/technetwork/java/javase/javaclientroadmapupdate2018mar-4414431.pdf). – Basil Bourque May 23 '19 at 03:20
  • Learn about [JavaFX](https://en.m.wikipedia.org/wiki/JavaFX) and [Swing](https://en.m.wikipedia.org/wiki/Swing_(Java)). – Basil Bourque May 23 '19 at 03:27

0 Answers0