Results 1 to 1 of 1
  1. #1
    hannehomuth's Avatar
    hannehomuth is offline Member
    Join Date
    Jul 2008
    Location
    Sommerfeld (Brandenburg, Germany)
    Posts
    36
    Rep Power
    0

    Default More than one KeyStroke (Shortcut) for a JMenuItem

    Hello everone again,

    I've another question. Is it possible to set more than one KeyStroke (Shortcut) to a JMenuItem. I mean that maybe STRG+N and INSERT do the same thing. I work with the Netbeans GUI Editor, and there you can only set one accelerator KeyStroke. Or is there any workaround I can use. I thought already about adding an KeyListenener to the main Form and if a Key is pressed i check which it was and do some things, but I think it's not the best idea, because I don't know exactly if that work i another component has the focus. I think it won't work.

    Any suggestions ??
    Last edited by hannehomuth; 07-25-2008 at 04:37 PM. Reason: Forgot something

Similar Threads

  1. Undo shortcut malfunctioning.
    By Eranga in forum NetBeans
    Replies: 0
    Last Post: 03-31-2008, 06:12 AM
  2. how to read single Keystroke without using return
    By oomanamemni in forum New To Java
    Replies: 1
    Last Post: 02-14-2008, 08:21 PM
  3. How to add a shortcut key from JTextArea
    By sukatoa in forum Advanced Java
    Replies: 2
    Last Post: 01-28-2008, 09:39 AM
  4. System.out.println shortcut
    By ravian in forum Eclipse
    Replies: 2
    Last Post: 11-07-2007, 11:17 AM
  5. Replies: 1
    Last Post: 07-29-2007, 11:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •