Lifecycle for applets
- From: "Tony Johansson" <johansson.andersson@xxxxxxxxx>
- Date: Wed, 15 Jun 2005 22:41:32 GMT
Hello experts!
I have an applet with a textfield where I can see the different states that
the applet has been in and in addition what the present state is. The applet
can say what state it is in because the applet has four metod which is init,
start, stop and destroy. I have the same html file and the same applet when
using the appletviwer and the browser.
Each time when method init is called the applet writes initializing in the
textfield.
Each time when method start is called the applet writes starting in the
textfield.
Each time when method stop is called the applet writes stopping in the
textfield.
Each time when method destroy is called the applet writes destroying in the
textfield.
When I run this applet by using the appletviewer I get the correct text in
the textfield from the applet. For example when I start the appletviewer
with a html with this applet I get initializing and starting in the
textfield which is correct. When I minimize the appletviewer and then bring
it up again the textfield has been added with stopping and starting which is
correct.
When I instead use the Microsoft Internet Explorer browser and run the same
html pages as for the appletviewer with the applet I get initializing and
then starting which is correct.
But if I minimize the browser and then bring the icon up again the textfield
has not been added with anything at all. I assume that stopping and starting
should have been added because that was the case when I used the
appletviewer.
The textfield looks like the following when the appletviewer has been used
and I have minimized the appletviewer two times.
initializing...starting...stopping...starting...stopping...starting
The textfield looks like the following when the browser has been used and I
have minimized the browser two times.
initializing...starting
Can anybody explain why not the stopping and starting was added in the
textfield when I minimized the browser and then bring it up again?
Have I understood this completely wrong?
//Tony
.
- Prev by Date: java applet grey in browser
- Next by Date: Newbie wants to get started
- Previous by thread: java applet grey in browser
- Next by thread: Newbie wants to get started
- Index(es):
Relevant Pages
|