🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #8651

what's wrong with this code?

#8651
From: Randy
Date: Thu, 27 Jul 2000 00:00
40 lines
1668 bytes
what's wrong with this code?

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

public class Test extends JApplet implements ActionListener{
 JButton butt;
 JTextField status;
 public void init() {
  Container c = getContentPane();
  c.setLayout(new FlowLayout());

  butt = new JButton("Scheiss IE");
  butt.addActionListener(this);
  c.add(butt);

  status = new JTextField(10);
  status.setEditable(false);
  c.add(status);
 }

 public void actionPerformed(ActionEvent e) {
      status.setText("Button Pressed");
 }

}

it's gives me the following error message:
java.security.AccessControlException: access denied
(java.lang.RuntimePermission modifyThreadGroup)
 at javax.swing.TimerQueue.sharedInstance(TimerQueue.java:66)
 at javax.swing.JApplet.<init>(JApplet.java:92)
 at Test.<init>(Test.java:5)
 at java.lang.Class.newInstance0(Native Method)
 at java.lang.Class.newInstance(Class.java:237)
 at sun.applet.AppletPanel.createApplet(AppletPanel.java:579)
 at sun.applet.AppletPanel.runLoader(AppletPanel.java:515)
 at sun.applet.AppletPanel.run(AppletPanel.java:293)
 at java.lang.Thread.run(Thread.java:484)
Technical Details
Message-ID: <8lpjs0$ebl8@bornews.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,c19e3d3df8334ab0,start
X-Google-Attributes: gid111d45,public
From: "Randy" <slyfox65@netzero.net>
Subject: what's wrong with this code?
Date: 2000/07/27
Message-ID: <8lpjs0$ebl8@bornews.borland.com>
X-Deja-AN: 651442751
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.swing