• Post Reply Bookmark Topic Watch Topic
  • New Topic

Running Applets in Browser...  RSS feed

Senthil Kumar Balasubramanian
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having the problem of running the below applet in the browser. I know that we have to sign the applet using Policy tool. I am not getting a clear picture of how to do that?
We are having command in Policy tool to do so. I have tried to sign the applet using the instructions given in website of Sun. But I couldn't achieve.

I would like to know the following,
1) What extent we can use the applet in Web without signing it? (With minimum features)
2) Is there anyother GUI based tool to do the same?
3) Will you pls send me the detailed info about how to make enable a applet using Policy Tool?
4) Is there any extra security coding necessary in the program?

Pls send me the detailed docs or procedures or samples for making the Applet work in browser...

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class Test extends JApplet
public void init()
Container contentPane = getContentPane();

// I dont want to use ImageIcon
// ImageIcon i = new ImageIcon(getImage(getCodeBase(), "swing.gif"));

Icon i = new ImageIcon("swing.gif","An animated GIF of Duke on a swing");

JLabel label = new JLabel("Swing!",i,SwingConstants.CENTER);

contentPane.add(label, BorderLayout.CENTER);


<body bgcolor = '#0000ff'>
<applet code="Test.class" width="300" height="300">
Tim Holloway
Posts: 18778
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't have to sign applets unless they want to:
1. access local files
2. print
3. talk to network hosts other than the one they were downloaded from
4. use JDBC
There may be a few others I've forgotten, but these are the most common uses.
9 times out of 10 people want to sign applets because they want to do one or more of the 4 items listed above. In actuality, they usually shouldn't be doing so, because you get better security and enterprise support by using a 3-tier app design and collaborating with the webapp's host server.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!