[4657] in java-interest

home help back first fref pref prev next nref lref last post

Re: Problem with handling events (killing windows in a menubar of a

daemon@ATHENA.MIT.EDU (Kevin Conner)
Wed Jan 10 11:42:39 1996

Date: Wed, 10 Jan 1996 14:42:33 +0000
From: Kevin Conner <knrc@impltd.com>
To: Sian Tan <tan@cdr.stanford.edu>
Cc: java-interest@java.sun.com


Your problem is the overriding of the Component handleEvent method
with your own, the action method is called from this routine.

You can get the functionality you desire by having your default case
return super.handleEvent(evt) instead of false.

> *************** 2nd code segment ***************
>   public boolean handleEvent(Event evt) {
>         switch(evt.id){
>             case Event.WINDOW_DESTROY:{
>                 this.dispose();
>                 System.exit(0);
>                 return true;
>             }
>             default:
**********        return super.handleEvent(evt) ;
>         }
>   }

I hope this helps,
	Kev
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post