• Post Reply Bookmark Topic Watch Topic
  • New Topic

want to forward MouseEvents from child to parent component  RSS feed

 
Alan Shiers
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone please help me with this little sample app. I'm trying to figure out how to forward MouseEvents from a child component (JTextArea) to the parent component (the contentPane). The contentpane is simply noting xy coordinates. When I move my cursor over the child component, it gets the focus and thinks I want to provide input. But I don't! I want this app to continue providing me with xy coordinates regardless of what child component the cursor enters. I need to forward coordinates from the JTextArea to the contentPane somehow. I think I'm on the right track but need a little help.

Sample app code follows.

Thanks,

Alan

 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Alan Shiers
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


Thanks. I entered the additional line of code but it didn't do anything. Any other suggestions?

Alan
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And change this line

to this
 
Alan Shiers
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah! that was it. It works.

Thanks so much!
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!