|
-
May 1st, 2004, 12:18 PM
#1
Thread Starter
Frenzied Member
Problem Loading Java Applet{resolved}
I cant get an applet to load that I copied right out of the book I'm learning from.
My default web browser wont load it but it doesnt say there was any error.
The appletviewer command line prompt doesnt work either.
I am almost certain I have the nessacary plugins
Here is the html code for the web page to show it:
<applet code=”RootApplet.class” height=100 width=300>
</applet>
Here is the code for the Applet
import java.awt.*;
public class RootApplet extends javax.swing.JApplet {
int number;
public void init() {
number = 225;
}
public void paint(Graphics screen) {
Graphics2D screen2D = (Graphics2D) screen;
screen2D.drawString("The square root of " + number + " is " + Math.sqrt(number),5,50);
}
}
Someone please help me!!!!
Last edited by System_Error; Jun 10th, 2004 at 10:09 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|