J
Jason Cavett
Hello,
What is the easiest way to add an ActionListener to every JMenuItem in
a JMenuBar (asuming that the JMenuBar has already been created)?
I have a general idea - but it seems like having to recursively iterate
through every item in the menu is overkill - or is that really the only
way of doing it? (Is there a generic - "add an action listener to
every item in the menu" type method? I couldn't find anything.)
Thanks.
What is the easiest way to add an ActionListener to every JMenuItem in
a JMenuBar (asuming that the JMenuBar has already been created)?
I have a general idea - but it seems like having to recursively iterate
through every item in the menu is overkill - or is that really the only
way of doing it? (Is there a generic - "add an action listener to
every item in the menu" type method? I couldn't find anything.)
Thanks.