I have a very simple applet that just tries to show one image. It works locally, however when I upload the class file, html file, and image file, it doesn't work properly. The html file opens, and the applet runs, however it remains blank. If I write an applet that shows lines, that works, however I cannot show any images. The filenames and paths are correct, including case. If I make an html file that shows the image, without using java it works. The code is below
| Code: |
|
import java.awt.*; import java.applet.*; public class JavaBMP extends Applet { Image CharImage; public void init() { CharImage = getImage(getCodeBase(), "Character.gif"); } public void paint(Graphics g) { g.drawImage(CharImage, 10,10, this); } } |
