[5112] in java-interest
Re: Event processing
daemon@ATHENA.MIT.EDU (Greg Ewing)
Mon Jan 29 15:22:04 1996
Date: Mon, 29 Jan 1996 15:21:32 +1100
From: grege@optimation.com.au (Greg Ewing)
To: tgee@eecs.umich.edu
Cc: java-interest@java.sun.com
> From NewsGroup_comp-lang-java Sat Jan 27 22:13 EST 1996
> From: NewsGroup_comp-lang-java
> >From: tgee@eecs.umich.edu ("Todd E. Gee")
> Subject: Event processing
> Date: 26 Jan 1996 08:41:02 -0800
> Nntp-Posting-Host: handler.eng.sun.com
> To: java-interest@java
>
>
> Hey all,
>
> Seems like, according to the API, events will be passed to a parent's
> handleEvent() rountine if the child's handleEvent() returns false.
>
> I have a class:
> public class RepApplet extends Applet {
>
> public synchronized boolean handleEvent(Event e) {
> System.out.print("Event: ");
> System.out.println(e.toString());
> return true;
> }
> }
>
>
> And then another class which extends RepApplet. The second class always
> returns 'false' from its handleEvent() but RepApplet.handleEvent() never
> gets called. Anyone have any wisdom regarding this?
>
> Ten-q, ten-q, ten-q,
> Todd
>
> -
Todd,
Place `return super.handleEvent(e);' at the end of the subclass' handleEvent()
(i.e. instead of `return false').
GREG
grege@optimation.com.au
> This message was sent to the java-interest mailing list
> Info: send 'help' to java-interest-request@java.sun.com
>
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com