terminating applet-process

  • Thread starter Georg Andersson
  • Start date
G

Georg Andersson

hi

i have written a little web-application that is used for browsing our
aerial image database. for every record in the database, 6 images are
loaded from the db and shown in the page. on of this images is loaded
inside an applet due to some graphics that are created dynamicly and
laid over the image. the image is not imported directly by the applet.
it's saved to disc first using a php-script and then loaded with the
applet.
on the web-page, there's a 'next' and a 'back' button, which enables
the user to browse through the database.

the problem is: the image inside the applet is not updated when the
user browses through the database. i guess i would have to 'terminate'
the applet-process and removing it from the RAM befor reloading the
applet.

does anyone have any experiences or ideas about this problem?

best regards

georg
 
A

Andrew Thompson

the problem is: the image inside the applet is not updated when the
user browses through the database.

You might find the methods destroy()
<http://java.sun.com/j2se/1.4.2/docs/api/java/applet/Applet.html#method_summary>
and it's associated method init(),
are not just handy, but indeed custom
built for these times.

A couple of other notes..
GUI problems are best discussed in..
<http://www.physci.org/codes/javafaq.jsp#cljg>
...but beginner problems should really go..
<http://www.physci.org/codes/javafaq.jsp#cljh>
 
G

Georg Andersson

Hi Andrew

tx for your help.
You might find the methods destroy()

i've overritten the destroy-method to set all variables of my applet
to 'null'. but still, the displayed image in the applet remains the
same. so i tried 'system.exit', but this terminates internet explorer.

once again: the applet loads an image ("image.jpg" on c:\temp). this
image changes as soon as the user clicks on a button. so, the php-page
containing the applet is reloaded. the idea would be: the applet
displays the new image. but this never happens. it allways shows the
previous image. even, if the image on c:\temp is removed, the applet
keeps displaying it.

so, the image must be stored in such way, that it can't be accessed by
applet.destroy()...

any ideas how to solve this?
 
A

Andrew Thompson

On 9 Jun 2004 05:12:53 -0700, Georg Andersson wrote:
...
(A.T.)
...
i've overritten the destroy-method to set all variables of my applet
to 'null'. but still, the displayed image in the applet remains the
same. so i tried 'system.exit', but this terminates internet explorer.

*What*?!? That does not gel with
a) common sense, or..
b) my experience with calling System.exit(0) in in applet*

* I hava an applet that launches applications,
when the apps. call System.exit(0) (as they might
commonly do) the Plug-In throws all sorts of
NotInThisSecurityManagerThankYouVeryMuchException's
[ yes ..it's a long one. ;-) ]
once again: the applet loads an image ("image.jpg" on c:\temp). this
image changes as soon as the user clicks on a button. .....
any ideas how to solve this?

SSCCE
<http://www.physci.org/codes/sscce.jsp>

Oh, and give us an URL..

What I would be *particularly* interested to see
is any applet that can shut down the browser in
which it resides..
 
R

Roedy Green

so, the image must be stored in such way, that it can't be accessed by
applet.destroy()...

Are you removing as well as nullifying? Nullifying has no effect on
visibility. The removing is what you need from the point of view of
visibility.

Is the browser ever calling your destroy method?

Put in some code to monitor when it calls init, start, stop and
destroy.
 
R

Roedy Green

* I hava an applet that launches applications,
when the apps. call System.exit(0) (as they might
commonly do) the Plug-In throws all sorts of
NotInThisSecurityManagerThankYouVeryMuchException's
[ yes ..it's a long one. ;-) ]

Maybe in signed Applet it lets you crash the browser.
 
J

John C. Bollinger

Georg said:
hi

i have written a little web-application that is used for browsing our
aerial image database. for every record in the database, 6 images are
loaded from the db and shown in the page. on of this images is loaded
inside an applet due to some graphics that are created dynamicly and
laid over the image. the image is not imported directly by the applet.
it's saved to disc first using a php-script and then loaded with the
applet.
on the web-page, there's a 'next' and a 'back' button, which enables
the user to browse through the database.

the problem is: the image inside the applet is not updated when the
user browses through the database. i guess i would have to 'terminate'
the applet-process and removing it from the RAM befor reloading the
applet.

does anyone have any experiences or ideas about this problem?

Do your "next" and "back" buttons cause the browser to do page reloads,
or do they just perform Javascript magic to load new images into the
existing document? If the latter then the only likely avenue of
approach is via Java / Javascript interoperation. If the latter, then
make sure the updated page retrieved in response to a "back" or "next"
contains the correct value for the parameter(s) that the applet uses to
load the correct file.

Do provide that example that Andrew asked for if you can't work out the
problem with what you've gotten so far.


John Bollinger
(e-mail address removed)
 
A

Andrew Thompson

On Wed, 09 Jun 2004 16:40:57 GMT, Andrew Thompson
* I hava an applet that launches applications,
when the apps. call System.exit(0) (as they might
commonly do) the Plug-In throws all sorts of
NotInThisSecurityManagerThankYouVeryMuchException's
[ yes ..it's a long one. ;-) ]

Maybe in signed Applet it lets you crash the browser.

Good point. (But I would still consider
that a Java bug). Is it signed, Georg?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top