🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: what's wrong with this code?

#8687
From: Jeroen Zwartepoorte
Date: Mon, 31 Jul 2000 00:00
51 lines
2117 bytes
It probably has something to do with loading swing classes, but other than
that, i have no idea. You should probably use the Java Plugin when running
inside a browser. Try that, it will probably work fine.

Jeroen

"Randy" <slyfox65@netzero.net> wrote in message
news:8lpjs0$ebl8@bornews.borland.com...
> 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: <8m5ssc$4du6@bornews.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8lpjs0$ebl8@bornews.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,c19e3d3df8334ab0
X-Google-Attributes: gid111d45,public
From: "Jeroen Zwartepoorte" <Jeroen@xs4all.nl>
Subject: Re: what's wrong with this code?
Date: 2000/07/31
Message-ID: <8m5ssc$4du6@bornews.borland.com>
X-Deja-AN: 653107512
References: <8lpjs0$ebl8@bornews.borland.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.swing