Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!news.stack.nl!aioe.org!.POSTED!not-for-mail From: Richard Maher Newsgroups: comp.lang.java.programmer Subject: Re: Applet instances Date: Sun, 13 Apr 2014 21:33:16 +0800 Organization: Aioe.org NNTP Server Lines: 16 Message-ID: References: NNTP-Posting-Host: jOhPn0KFjrxwuMc9OPMmCw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:28060 On 4/13/2014 12:29 PM, Roedy Green wrote: > If you have multiple instances of an Applet on page, how can they give > error messages to tell you which one is having a problem. I have > added with unique values to > each instance. > > Is there an easier way? > I thought there was but looking at my code (which I hope to finish over easter) I just use static variables and an array of my class. If there's a null entry use that else .add() it on the ArrayList etc. I'll check again next w/e 'cos iirc the Applet thread gets a unique index for each instance so I'm guessing there's some intrinsic attribute somewhere.