hi, i would like to know the order or flow of execution of a java program and an applet when compiling and running... like it starts with main...and then.. looking forward for a good reply... gayathri
Val Dra
Ranch Hand
Joined: Jan 26, 2001
Posts: 439
posted
0
order is init, start, paint , stop
Val SCJP <BR>going for SCJD
Grant Crofton
Ranch Hand
Joined: Nov 08, 2000
Posts: 154
posted
0
An application just does main(). Not sure about compilation, though.
Graeme Brown
Ranch Hand
Joined: Oct 13, 2000
Posts: 193
posted
0
The applet lifecycle is a bit more complicated than described above. It is correct that init is called first, then start. After that stop will be called if the browser loses the focus (the user moves to another window) and start will be called when focus is regained. Lastly destroy is called. Paint can be called at any time that the screen area needs to be refreshed, resizing the window or dragging another window over the top etc etc. To summarise init() first then one or more iterations of start() - stop() finally destroy()
gayathri bhushan
Ranch Hand
Joined: Jan 29, 2001
Posts: 39
posted
0
thanks to all of you.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.