• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

a little confusion with mouseListener

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to Swing/AWT.
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic