[4333] in java-interest

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

Re: Questions on mouse events and other misc stuff

daemon@ATHENA.MIT.EDU (Pat Niemeyer)
Tue Dec 19 03:34:23 1995

Date: Tue, 19 Dec 1995 00:52:36 -0600 (CST)
From: Pat Niemeyer <pat@icon-stl.net>
To: Laurent Duperval <laurent@Grafnetix.COM>
cc: java-interest@java.sun.com
In-Reply-To: <9512142212.AA04506@renoir.Grafnetix.COM>


On Thu, 14 Dec 1995, Laurent Duperval wrote:

> There's one thing I don't understand though.  How can I have a panel
> containing, say, a Graphics object, a button and a label respond to mouse
> events?  In other words, how can I force a Container (in this case my Panel)
> to respond to events instead of its components responding?

Simply override the appropriate event handling methods in the container
instead of the components.  The default behavior for components is to
pass events on to their containers.  

You can identify who sent the event by looking at its target field.


Pat
-
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