On Fri, 13 Nov 1998 07:12:00 -0500
Karthik Vishwanath <[EMAIL PROTECTED]> wrote

> Hi all,
>       i am relatively new to Java and i am trying to learn the UI (or
> the awt). 

... code example removed ...

>       The code compiles ok, but then when i click on the "Exit" in the
> appletviewer i get a load of exceptions thrown. If the System.exit() is
> commented out, the applet still does not close. 
> 
> 1. how do i terminate an applet?

It should terminate if you override the destroy() method and call 
dispose() in it. I'm not sure if you need to call setVisible(false) and 
stop(), but it should not hurt.

I have an example at http://fieldrep.ed.umuc.edu/~crecord/
Click on the pinball game and verify that the quit button and close 
buttons work. You can also check out the source of the 
PinBallGameApplet.java. 

... larry arnoldy

Reply via email to