Hello,
I want to change behaviour little bit when I choose item from my ComboBox
.
I want to set special action when command button on keyboard is down. But mouseDown()
works only when I click on ComboBox
, but when I click on chosen item in popup menu, then the mouseDown()
in not called. Could anyone help?
Great thanks in adbance.
Best Regards
This isn’t an answer, but an explanation of why what you are doing doesn’t work. A ComboBox
is a combination of Components
, and the PopupMenu
portion is separate from the Item/Arrow portion. So, while you are override the mouseDown
in ComboBox
, you aren’t (can’t) override the mouseDown
in it’s corresponding PopupMenu
… sooo… You might be able to get the PopupMenu
using ComboBox::getRootMenu()
to get access to the PopupMenu
, and use a mouseListener
to get mouse events, but, that’s not the same as overriding mouseDown
, so I don’t know if it will help solve your problem.