I am new to java and the 1.2 JDK. I am running RedHat 5.2 and the
Blackdown JDK1.2-v1pre-release. The install went fine. I have finally
figured out the libstdc++ link and I can successfully compile command
line applications.
 
However, I am getting the following error on this simple applet. Any
ideas on how to resolve this.
 
[root@localhost java]# cat RootApplet.java
import java.awt.*;
 
public class RootApplet extends com.sun.java.swing.JApplet {
int number;
 
public void init() {
number = 225;
}
 
public void paint(Graphics screen) {
super.paint (screen);
Graphics2D screen2D = (Graphics2D) screen;
screen2D.drawString("The square root of " +
number +
" is " +
Math.sqrt(number), 5, 50);
}
}
[root@localhost java]# javac RootApplet.java
RootApplet.java:3: Superclass com.sun.java.swing.JApplet of class
RootApplet not found.
public class RootApplet extends com.sun.java.swing.JApplet {
^
1 error
[root@localhost java]#
 
Thanks
Richard James
 
 

Reply via email to