0

Hi everyone !

This is my first new post, I have a problem with my Java code. I am trying to make a first applet, and have gotten this code from a book, "Java - An Introduction To Problem Solving & Programming", by Walter Savitch and Frank Carrano :

import javax.swing.JApplet;
import java.awt.Graphics;
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);
       }
}

Any ideas why I keep getting an error message coming from NetBeans 5.5.1 that it can't find "HappyFacemain.class" ? Thanks in advance !

-dtfan6

2
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by dtfan6
0

I have tried renaming the file, but it doesn't seem to help. Can it be done that way, or does it have to be named that before compiling? Thanks for responding, btw, jasimp. :)


....Scratch that last post, I think I see what you mean, jasimp. I'll try that.

0

I have tried renaming the file, but it doesn't seem to help. Can it be done that way, or does it have to be named that before compiling? Thanks for responding, btw, jasimp. :)

Scratch the last thing I wrote above ^^^I think I see what you mean, jasimp. I'll try that.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.