Hi, I'm still having trouble with HelloWorld and since I'm a "newbie" who does this strictly as a hobby please bear with me.
I used the following as a HelloWorld example off of
Java's "My First Cup of Java":
import java.applet.*;
import java.awt.*;
/**
* The HelloWorld class implements an
applet that
* simply displays "Hello World!".
*/
public class HelloWorld extends Applet {
public void paint(Graphics g) {
// Display "Hello World!"
g.drawstring("Hello World!", 50, 25);
}
}
As you can see, I've been able to compile "HelloWorld App.class".
But I'm missing something in "HelloWorld"
Microsoft Windows XP [Version 5.1.2600]
C:\Program Files\Java>javac HelloWorldApp.java
C:\Program Files\Java>dir
Volume in drive C has no label.
Volume Serial Number is D8CE-C900
Directory of C:\Program Files\Java
04/23/2005 04:26 PM <DIR> .
04/23/2005 04:26 PM <DIR> ..
04/23/2005 04:26 PM 432 HelloWorldApp.class
04/23/2005 04:24 PM 266 HelloWorldApp.java
04/21/2005 07:19 PM <DIR> jdk1.5.0_02
03/20/2005 06:36 PM <DIR> jre1.5.0_02
2 File(s) 698 bytes
4 Dir(s) 32,285,954,048 bytes free
C:\Program Files\Java>java HelloWorldApp
Hello World!
C:\Program Files\Java>javac HelloWorld.java
HelloWorld.java:11: cannot find symbol
symbol : method drawstring(java.lang.String,int,int)
location: class java.awt.Graphics
g.drawstring("Hello World!", 50, 25);
^
1 error
In the previous post, Chi Ming Chong stated that I'm missing something. Can you give further info, puleese.