DZone ForumsDZone Forums  

Go Back   DZone Forums > Community > Languages & Frameworks > Java
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
LinkBack Thread Tools Display Modes

Topic: Pass events through the layers of a JLayeredPane
Old 07-18-2008, 05:17 AM   #1 (permalink)
Member
 
Join Date: Jul 2008
Posts: 1
I am using java/swing. Inside a JLayeredPane I have put various objects at various layers. As a result mouseclick events are caught only by the actionlisteners of the top level objects. I want to further "forward" these events to the underlying layer objects.

So the top-level objects handle the event first, and then "somehow" the event is forwarded to the next underlying level. If there is an object located at the underlying level at this position (and there is an actionlistener settled) the event is caught by this actionlistener and so on. I want all the process to be totally "transparent" for the objects at each layer, meaning that the object at each layer will not be able to distinguish if the event is fired from the user or being forwarded by an upper level.

Any ideas?
lndeveloper is offline   Reply /w Quote -


Thread Tools
Display Modes



All times are GMT -5. The time now is 07:46 PM.