【发布时间】:2012-12-28 17:15:32
【问题描述】:
我已经用 Google 搜索并进行了研究,但我仍然不明白我哪里出错了。
我的程序包含三个类:myFrame、myRightPanel 和 calculationEngine。 myFrame 是扩展 JApplet 的类,我这样做了:
public class myFrame extends JApplet implements ActionListener {
//bunch of things here
}
myRightPanel 类和calculationEngine 类由myFrame 实例化和使用。整个代码在 Eclipse 的小程序查看器中运行良好。我面临的麻烦是将其嵌入到 html 中。我这样做了,但它不起作用。
<!DOCTYPE html>
<html>
<body>
<marquee>
<h1> Ghun Chaatlo </h1></marquee>
<applet code="myFrame.class" height="800" width= "1200">
</applet>
</body>
</html>
所有文件:.html 和 .class 文件位于同一目录中。但是当我运行 html 时,它不显示小程序。 IDK 为什么?请帮忙。
【问题讨论】:
-
这是你要找的东西吗:stackoverflow.com/questions/4272666/…
-
这篇文章可能对你有所帮助stackoverflow.com/questions/7999343/…
-
您是通过 Web 服务器加载 html 页面吗?还是直接打开文件?直接加载时,浏览器的安全管理器不允许加载小程序。
-
直接!不与服务器。我不知道,让我试试把它放在服务器上。