We want to show Help file for every JMenu and JMenuItem in our application.
Preferably with pressing F1 key when selection is on any JMenu /JMenuItem. Mouse Right-Click is also an option i tried with addMouseListener method, but the mousevent is never fired.
I will appreciate if you can suggest a solution.
What I have tried is the method registerKeyboardAction() which we use for Panel help.
panel.registerKeyboardAction(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
//.... Here is Code to open HTML Page
}
}, className, KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0, false),
JComponent.WHEN_IN_FOCUSED_WINDOW);
But in Menu, as always the focus is on last menuitem, help is opened for last menuitem.