ComboBox MouseListener

It seems that it’s impossible to connect a MouseListener to a ComboBox and successfully receive mouse events, because the Component itself adds a private Label, which actually should be the one to listen to.
How is this intended and how can mouse event listening be achieved/worked around?

Dear ROLI,
should I continue to bother, or are there some mysterious obstacles to answer this question? Possible answers include, but are not limited to:

  • erm, we don’t know, we don’t care, go away!
  • we don’t know yet the answer but looking into this difficult issue and may come back with an answer sooner or later,
  • you are doing stupid things here, you should do this and that instead

But just ignoring a question to your framework just doesn’t seem the right approach to me, am I wrong?

Setting wantsEventsForAllNestedChildComponents to true when calling addMouseListener() will inform you of any mouse events on its child components - is this not working in your case?

1 Like

Thanks @ed95, thats what I tried in the beginning (but somehow didn’t succeed), and now thanks to your suggestion retried it, and its working now! Thanks!