# signed applets

Manish Srivastrava (msrivast@lads.is.lmco.com)
Tue, 03 Aug 1999 20:14:28 +0000

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Ravi_KS@syntelinc.com: "signed applets"
- Previous message: Jan Luehe: "Re: Java Plugin 1.2.2 and Certificates"

    Date: Tue, 03 Aug 1999 20:14:28 +0000

    From: Manish Srivastrava <msrivast@lads.is.lmco.com>

    Subject: signed applets

    To: java-security@java.sun.com

I have an applet that has a button actionListener in i. When
I try to run it via appletviewer I get a
java.lang.IllegalAccessError. I have tried with both signed
and unsigned same result both times.

Here is the code:

import java.awt.*;
import java.awt.event.*;
import java.util.*;
import com.sun.java.*;
import com.sun.java.swing.*;

public class test extends JApplet {

public test()
{
getRootPane().putClientProperty("defeatSystemEventQueueCheck",

Boolean.TRUE);
}

public JPanel createForce ()
{
JLabel name = new JLabel("name: ");
JPanel pane = new JPanel();
final JTextField forceName = new JTextField("",30);
JButton createForce = new JButton("Create my Force");

pane.setLayout(new FlowLayout());
pane.add(name);
pane.add(forceName);
pane.add(createForce);

createForce.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});

return pane;
}

public JPanel createSide ()
{
JButton createSide = new JButton("Create my Side");
JLabel name = new JLabel("name: ");
final JTextField sideName = new JTextField("",30);
JPanel pane = new JPanel();

pane.setLayout(new FlowLayout());
pane.add(name);
pane.add(sideName);
pane.add(createSide);

return pane;
}

public Component createComponents() {
JTabbedPane tabbedPane = new JTabbedPane();
ImageIcon icon = new ImageIcon("middle.gif");

JPanel pane1=createForce();
JPanel pane2=createSide();

/*put the previous panels into a tabbed pane */
tabbedPane.addTab("Create Force", icon, pane1, "Does
nothing");
tabbedPane.addTab("Create Side", icon, pane2, "Does
nothing");

return tabbedPane;
}

public void init() {
test app = new test();
Component contents = app.createComponents();
getContentPane().add(contents, BorderLayout.CENTER);
}
}

- Next message: Ravi_KS@syntelinc.com: "signed applets"
- Previous message: Jan Luehe: "Re: Java Plugin 1.2.2 and Certificates"