Greetings, Two questions: 1. How can I make a particular character a 'hotkey' in a JMenuItem. For example, I want x to be the hotkey for the Exit menu item. In most languages, an & prefix works. Doesn't work in Java. 2. I want to launch an HTML file from a menu item. The file will be in the same folder as the classes. Which function can I use to open the HTML file? The HTML file will contain the user documentation. Thanks for any help. -Pat
posted 15 years ago
Let say we have JButton named Murphy. We want M as a hot key right! Following code gonna work.
That is it. I am not sure about number 2. BTW, are you talking about javadoc to launch HTML file? if so javadoc generates html files for each class. - Bal
[This message has been edited by Bal Sharma (edited November 13, 2001).]