469,626 Members | 1,466 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

I am having issues with running applets from SitePad Pro

I am trying to create an applet using SitePad Pro. I am a college student and have a lab where I need to create applets. I did it in class just fine. I tried to run a "Hello World!" applet and it isn't working from my home computer. I even tried running an applet example from SitePad and it doesn't work either. The code I try is:
Expand|Select|Wrap|Line Numbers
  1. import java.awt.*;
  2. import javax.swing.JApplet;
  4. public class Greeting extends JApplet
  5. {
  6.      public void init( )
  7.      {
  8.           resize(300, 300);
  9.      }
  10.      public void paint(Graphics g)
  11.      {
  12.           g.drawString("Hello World!!!", 20, 20);
  13.      }
  14. }
When I do this, it compiles fine and then when I run the test applet, the applet doesn't come up and the message at the bottom window is:
"Starting appletviewer for C:\Documents and Settings\j\My Documents\Homework CIS133SC\Lab2\Greeting.java
The current directory is: C:\Documents and Settings\j\My Documents\Homework CIS133SC\Lab2
Command line: "C:\Program Files\Java\jdk1.6.0_17\bin\appletviewer.exe" "file:///C:\Documents and Settings\j\My Documents\Homework CIS133SC\Lab2\Greeting.java"
Classpath: ."

Can anyone tell me what is missing or what I am doing wrong? I have an "greeting.html" file in the same folder that my "greeting.java" is in that I am trying to run.
Dec 8 '09 #1
0 913

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Justin | last post: by
1 post views Thread by Vincent Montressor | last post: by
8 posts views Thread by Andreas Røsdal | last post: by
4 posts views Thread by Neil Cherry | last post: by
11 posts views Thread by Jeff Robichaud | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.