have a start/terminate feature of applet
by barkkathulla[ Edit ] 2012-09-22 11:43:17
AFTAR AN APPLET IS INITIALIZED,IT IS STARTING. STARTING CAN ALSO OCCUR
IF THE APPLET WAS PREVIOUSLY STOPPED. FOR EXAMPLE, AN APPLET IS STOPPED
IF THE READER FOLLOWS A LINK TO A DIFFERENT PAGE, AND IT IS STARTED
AGAIN WEN THE READER RETURNS TO THIS PAGE. NOTE THAT STARTING CAN OCCUR SEVERAL TIMES DURING AN APPLET'S LIFE CYCLE, WHEREAS INITIALIZATION HAPPENS ONLY ONCE. TO PROVIDE STARTUP BEHAVIOUR FOR APPLET,OVERRIDE THE START ()
METHOD:
PUBLIC VOID START () {
...
}
FUNCTIONALITY THAT YOU PUT IN THE START () METHOD MIGHT INCLUDE STARTING UP A THREAD TO CONTROL THE APPLET, SENDING THE APPROPRIATE MESSAGES TO HELPER OBJECTS, OR IN SOME WAY TELLING THE APPLET TO BEGIN RUNNING.
STOPPING
~~~~~~~~
STOPPING OCCURS WHEN THE READER LEAVES THE PAGE THAT CONTAINS A CURRENTLY RUNNING APPLET,OR YOU CAN STOP THE APPLET YOURSELF BY CALLING STOP ().
BY DEFAULT, WHEN THE READER LEAVES A PAGE ANY THREADS THE APPLET HAD
STARTED WILL CONTINUE RUNNING.
PUBLIC VOID STOP () {