方法将JFrame附加到java中的html页面
applet很容易嵌入到html页面中,但是当我使用applet代替JFrame时,我面临许多问题。我想在html页面中直接嵌入JFrame。是否有一种方法可以在JFrame中嵌入/运行Java文件,在html页面中嵌入/运行另一个Swing组件 上次创建applet时,我在init方法中向JApplet添加了一个JPanel方法将JFrame附加到java中的html页面,java,Java,applet很容易嵌入到html页面中,但是当我使用applet代替JFrame时,我面临许多问题。我想在html页面中直接嵌入JFrame。是否有一种方法可以在JFrame中嵌入/运行Java文件,在html页面中嵌入/运行另一个Swing组件 上次创建applet时,我在init方法中向JApplet添加了一个JPanel @Override public void init() { highScores = new MinesweeperHighScores(); high
@Override
public void init() {
highScores = new MinesweeperHighScores();
highScores.readScores();
MinesweeperGameType gameType = MinesweeperGameTypeFactory
.getGameType(highScores.getGameType());
MinesweeperGameStatus gameStatus = new MinesweeperGameStatus(gameType);
MinesweeperPanel panel = new MinesweeperPanel(gameType, gameStatus,
highScores, this);
add(panel.getMainPanel());
setSize(gameType.getSize());
}
这是一个在Applet中使用swing组件的例子,我的问题也可以用这种方法解决。但我只想知道,像applet一样,是否有任何方法可以在HTML中附加JFrame。@Gayatri Thakur:我不知道有任何方法可以将JFrame附加到HTML页面。