Thursday, February 6, 2014

JApplet content blocked


I just created an applet that I want to call from a html file.


The applet code looks like this (and works):



Java Code:



package jav12;

import java.awt.*;

import javax.swing.*;

public class Welcome extends JApplet {

public Welcome(){

}
public void init() {
getContentPane().add(new Label("Yessss it works",Label.CENTER));
}

}

The html looks like this:


XML Code:



<html>
<head>
<title>
welcome
</title>
</head>
<body>
jav12.Welcome is getting loaded here.....

<applet
codebase="."
code="jav12.Welcome"
name="Welcome"
width="500"
height="500"
hspace="0"
vspace="0"
align="middle">
</applet>
</body>
</html>

When I click on the html file the content of the page is blocked and the applet isn't loaded.

What can I do to fix this.

I think it has something to do with rights.


This is a crosspost to http://www.javaprogrammingforums.com...tml#post138197



No comments:

Post a Comment