I am currently in a midst of developing an desktop application. I have the menu bar, which has the RUN command with the ALT-R mnemonic. Also, I have a RUN button in one of the frames & I have declared an ActionListener for the same. Is there a way to use the same ActionListener for the RUN command menu-item..? Or should it be re-declared all the way again..?
Share
If you calling second class from first then you can pass the class where you implemented the
ActionListenerto second class. i.e.Or you can also easily pass it as: