Article View: borland.public.jbuilder.java.swing
Article #8656Re: about initializer
From: Randy
Date: Thu, 27 Jul 2000 00:00
Date: Thu, 27 Jul 2000 00:00
132 lines
4959 bytes
4959 bytes
I am still having problem getting the two anonymous classes from the jar to
be recognized. any suggestions?
Rich Wilkman <richw@formlessvoid.com> wrote in message
news:397FAB16.2A9D7CE4@formlessvoid.com...
> Randy:
>
> I don't know. Your trace doesn't look like what you get from the
> Plugin. Did you run your HTML throught the converter?
>
> -Rich
>
> Randy wrote:
> >
> > i already have the plug-in's; I believe that the problem lies in this:
> > package ImagePackage;
> >
> > import java.awt.*;
> > import java.net.*;
> >
> > public class ImageCanvas extends Canvas {
> > public Image image;
> >
> > public ImageCanvas() {
> > super();
> > }
> >
> > public ImageCanvas(String imageName) {
> > this();
> > image = Toolkit.getDefaultToolkit().getImage(imageName);
> >
> > MediaTracker mt = new MediaTracker(this);
> > try {
> > mt.addImage(image,0);
> > mt.waitForID(0);
> > }
> > catch (InterruptedException ex) {
> > ex.printStackTrace();
> > }
> > }
> >
> > public void paint(Graphics g) {
> > g.drawImage(image,0,0,null);
> > }
> >
> > public Dimension getPreferredSize(){
> > return new Dimension(image.getWidth(null),image.getHeight(null));
> > }
> >
> > }
> > or there is another code that i am suspecting also.
> >
> > Rich Wilkman <richw@formlessvoid.com> wrote in message
> > news:397E6020.C8468A93@formlessvoid.com...
> > > Randy:
> > >
> > > Okay, as I suspected you are trying to use JFC (Swing) in an Applet.
No
> > > browser supports that out of the box (a topic that is covered over and
> > > over and over again here in these newsgroups). You can look at the
> > > Plugin if you must use JFC in the Applet.
> > >
> > > -Rich
> > >
> > > Randy wrote:
> > > >
> > > > here's the whole trace:
> > > >
> > > > 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 DeckOfCards.<init>(DeckOfCards.java:8)
> > > > 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)
> > > >
> > > > Rich Wilkman <richw@formlessvoid.com> wrote in message
> > > > news:397D15F6.247C5191@formlessvoid.com...
> > > > > Randy:
> > > > >
> > > > > Offhand, I'd say it means you are trying to use JFC in your
Applet.
> > > > > It's never helpful to "edit" the trace. Post the whole thing from
top
> > > > > to bottom. Note, if you are using IE you have to have the Java
> > console
> > > > > up before accessing your Applet; otherwise you won't see your
trace.
> > > > >
> > > > > -Rich
> > > > >
> > > > > Randy wrote:
> > > > > >
> > > > > > i am getting java.security.AccessException: access denied; what
does
> > > > that
> > > > > > mean?
> > > > > > Rich Wilkman <richw@formlessvoid.com> wrote in message
> > > > > > news:397C5A44.D1834B94@formlessvoid.com...
> > > > > > > Randy:
> > > > > > >
> > > > > > > No. The "not initialized" message for Applets usually means
you
> > > > haven't
> > > > > > > set things up correctly or deployed all the classes or are
trying
> > to
> > > > use
> > > > > > > JFC, etc. Look in the Java Console for the real error message
and
> > > > work
> > > > > > > from there.
> > > > > > >
> > > > > > > -Rich
> > > > > > >
> > > > > > > Randy wrote:
> > > > > > > >
> > > > > > > > do all classes that are created require a no argument
> > initializer?
> > > > I am
> > > > > > > > getting that an applet isn't initialized and can't find the
> > problem.
> > > > > > > >
> > > > > > > > why does an applet run properly in the appletviewer but
gives
> > > > "applet
> > > > > > isn't
> > > > > > > > initialized" when running it thru a browser?
Technical Details
Message-ID:
<8lqt96$mmb9@bornews.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8lgc0n$da59@bornews.borland.com> <397C5A44.D1834B94@formlessvoid.com> <8li7hc$3be8@bornews.borland.com> <397D15F6.247C5191@formlessvoid.com> <8lks8o$16h3@bornews.borland.com> <397E6020.C8468A93@formlessvoid.com> <8ln108$jg36@bornews.borland.com> <397FAB16.2A9D7CE4@formlessvoid.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,3fc094048b408106 X-Google-Attributes: gid111d45,public From: "Randy" <slyfox65@netzero.net> Subject: Re: about initializer Date: 2000/07/27 Message-ID: <8lqt96$mmb9@bornews.borland.com> X-Deja-AN: 651667176 References: <8lgc0n$da59@bornews.borland.com> <397C5A44.D1834B94@formlessvoid.com> <8li7hc$3be8@bornews.borland.com> <397D15F6.247C5191@formlessvoid.com> <8lks8o$16h3@bornews.borland.com> <397E6020.C8468A93@formlessvoid.com> <8ln108$jg36@bornews.borland.com> <397FAB16.2A9D7CE4@formlessvoid.com> 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