[4687] in java-interest
Re: A button named Quit
daemon@ATHENA.MIT.EDU (Jim Graham)
Wed Jan 10 21:24:49 1996
Date: Wed, 10 Jan 1996 17:10:33 -0800
From: flar@bendenweyr.Eng.Sun.COM (Jim Graham)
To: java-interest@java.Eng.Sun.COM, jordan@Thinkbank.COM
> I was mocking-up a page for a client the other day, and I noticed
> that if a button named "Quit" gets pressed, appletviewer exits (JDK
> Beta, Solaris)!
If you don't handle the event yourself (and return true to indicate
that you have successfully handled it), then it falls on the Component's
parent to handle. Eventually the event will get back to the AppletViewer's
window if none of your Components or your Applet handle it.
Since the AppletViewer's handleEvent routine triggers off of the event's
argument and never checks that the target is one of its own, it will
be fooled into quitting when any event whose argument is "Quit" falls
through to it. (Not very good programming practice when you come down
to it...)
...jim
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com