对的,你运行方式不对。
你看JApplet,,IE浏览器默认是不支持的。你运行使用appletviewer  applet.html
applet.html
<html><body>
<applet code="title1.class" codebase="" width="400" height="300">
</applet>
</body></html>