1. Key accelerator question coderanch.com |
2. Accelerator keys coderanch.comHi all I have an RCP application with different actions on it, the problem I am having is setting up shortcut keys for those actions. My application is running on Eclipse 3.0. My xml file look like this: |
3. Action accelerator coderanch.comCan any please tell me why pressing CTRL-ENTER does not fire an action event? import static java.util.Arrays.asList; import static javax.swing.KeyStroke.getKeyStroke; import static java.awt.event.InputEvent.CTRL_MASK; import static java.awt.event.KeyEvent.VK_ENTER; import javax.swing.Action; import javax.swing.AbstractAction; import javax.swing.JToolBar; import javax.swing.JList; import javax.swing.JFrame; import java.awt.event.ActionEvent; import java.awt.BorderLayout; import java.util.Vector; public final class Main4 { private Main4() throws UnsupportedOperationException { throw new UnsupportedOperationException(); } public static void main(final String[] ... |
4. Multi-Key Accelerator coderanch.comDo you have a menu like the following one: MenuBar |--File | | | |-Open | |-Save | |-Close | |--Preferences | | | |-Menu ... And you would like to have an quick access to Preferences -> Menu? So, your menu would look like this: JMenuBar mainMenu = new JMenuBar(); JMenu fileMenu = new JMenu("File"); fileMenu.setMnemonic (KeyEvent.VK_F); // Set accelerator ... |
5. Accelerator key on ChartPanel in Swing? jfree.orgHello all, I have a subclass of ChartPanel and I want it to respond when the user types a backspace by reverting the chart to a previous state. How do I go about making the chart respond to backspace? My first idea was to override createPopupMenu from ChartPanel and add a new item "Back" to that menu, and then put an ... |