I have a JMenuItem "Find" in the Edit Menu.
I want to add a shortcut key to the JMenuItem.
For Find for example i want to use Ctrl + F
Here is my 'Action' for 'Find' which can be used via Edit->Find. It works.
WordSearcher() is a class i am using to search the word
Now i want to add a KeyListener for ctrl+F
for doing the same purpose.
Even this one works.
But the problem here is i have to write the same code twice.
Is there some way by which I can Use the already written Action Find in the KeyListener.