-
Problems with Java
Ok, i have made lots of applets in Java. They work fine in jbuilder 3 and 4, and appletviewer that comes with the new JDK, yet the HTML pages won't run under IE or Netscape. Why?! Also, sometimes after I make a change in an applet on the rare occasion that I do get it to run (Usually with only a drawString(), I have given up any hope of writing swing applets) the applet won't even update right away (see thread below). I have to convert the HTML page using sun's program, compile the applet, edit the HTML page so it is just the applet tag, and re-convert it. I know i shouldn't have to go through all this. I have checked my code time and time again. I have followed directions to the letter in any tutorials i come across. Why does all this happen?
-
are you using swing?? If so you browsers will not run swing applets until you download the jre (java runtime environment)
-
No, no swing, this is the applet I am using.
Code:
import java.applet.Applet;
import java.awt.Graphics;
public class test extends Applet
{
public void paint(Graphics g)
{
g.drawString("Hello", 5, 25);
}
}