java - Ctrl mask passing from mouse event to action performed -


in code have menu item action attached action map (menuitem.setactionname("somestring")).

in action map, values, have objects of classes extends abstractaction, implemented actionperformed method. problem is, how pass modifiers mouse event (mouse released when clicked on menuitem) actionperformed? have check if action or without ctrl called in actionperformed method. information modifiers in mouseevent, call stack shows doclick on menu item called, invokes actionperformed (through setpressed). in moment, information modifiers mouseevent aren't passed needed information lost.

thanks!

try overwriting processmouseevent on class extending jmenuitem. can modifier mouseevent @ processmouseevent method.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -