• Post Reply Bookmark Topic Watch Topic
  • New Topic

a little confusion with mouseListener  RSS feed

 
Micah Pezdirtz
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
im getting into java3d and playing around with 3d models, but obviously need to change the view easily once its been loaded so i started making some mouseListener and mouseWheelListener.
my problem is that the mouseWheelListener works fine but the MouseListener isnt working at all, its not even getting calls to any of its methods. the mousWheelListener and the MouseListener are merged into one inner class, and the code for attatching them to my frame is like this

so its not that im not adding them correctly. the frame i'm adding it to is just a regular Frame. i dont really understand why the MouseListener functions arent even getting calls. is it because i mereged MouseWheelListener with a MouseListener? please help guys, thanks
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Swing/AWT.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have you added any components to the frame?

if so, do these components have anything that is likely to consume mouseEvents
e.g. toolTips

both listeners work fine in this simple demo


do the same with your code - just a frame, and the GeneralMouseListener class,
check they both work OK, then start adding components to the frame, one at a time.
Compile/test as you go - eventually you will get to whatever is consuming the mouseEvents
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!