appletviewer MyFirstApplet.html
*nothing returned nothing shown*
--
appletviewer -debug MyFirstApplet.html
> run
run sun.applet.Main MyFirstApplet.html
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
>
VM Started:
The application exited
--
MyFirstApplet.html
Code:
<html>
<head>
<title>MyFirstApplet</title>
</head>
<body>
<hr>
<applet code="MyFirstApplet.class" width=300 height=200>
<hr>
</body>
</html>
--
MyFirstApplet.class
Code:
import javax.swing.JApplet;
import java.awt.Graphics;
public class MyFirstApplet extends JApplet {
public void paint(Graphics g) {
g.drawString("To climb a ladder, start at the bottom rung", 20, 90);
}
}
--
Source: Java 2, Wrox
Tools: vi & Sun's Java SDK 1.4.1
Q: how do you normally test an applet? Any errors in my code & html?
Mozilla 1.2.1 & the same SDK doesn't run it either. A red cross on the top-left.