• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPanel consuming Mouse Input

 
Chris Nash
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JPanel (A) that the user can grab and move around. I have other JPanels (Bs) that are peers to A (they are aggregated in the same parent JPanel as A). Bs are MouseListeners that want to know when the mouse enters or exits them. When A is dragged over a B, the B doesn't get mouse input. They only get mouse input if A is moved off of them. I still want the Bs to get mouse input, whether or not A is on top of them (Bs are about the same size as A, so A covers them). Is there a simple API call that I can get to "push" mouse input down to the JPanel below? I can think of several ugly work-arounds, but none are elegant. TIA!
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a simple API call that I can get to "push" mouse input down to the JPanel below?

dispatchEvent()
 
Chris Nash
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you!
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic