Shortcut Key in JInternalFrame

Hi,
I have an application that has multiple JInternalFrames displayed within split panes. I am trying to set shortcut keys to cycle through the visible JInternalFrame. I have a Menu Item oCycleWindows, on which I called setAccelerator() with Ctrl+Shift+M. In th emenu handler for this item, I have defined a function that checks the current focussed internal frame, and accordingly picks the next one to get the focus.
My problem is as follows: on clicking Ctrl+Shift+M, I am able to see that the next window has focus (the title bar color changes), but when I use the up/down keys to navigate within the newly focussed window, actually the navigation happens in the previous window....
I have a tree view at the left, and two views at the right, and going from the tree view to any of the right views sometimes works correctly, sometimes doesn't (in fact i believe this happens every alternate time I shift to the non-tree view). Here, I have tables in the right views, and I try to select different rows using up/down keys once the right view has the focus, but the navigation occurs in the Tree view, with previous/next node getting selected instead!
The funniest part is, the problem isn't there if the shortcut defined is 'F6', but for any other shortcut (F12, F11, Ctrl+M, Ctrl+Shift+M, Ctrl+K, CTrl+Shift+K etc.) this problem is seen.
Does anyone have ANY idea why this happens? I tried to look up the bugs DB, but couldn't find anything specific to this...
Sample Code:
JMenuItem oCycWin = new JMenuItem("Cycle Windows");
oCycWin.setMnemonic('C');
oCycWin.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK | ActionEvent.SHIFT_MASK, true));
//oCycWin.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F6, 0, true));
oCycWin.addActionListener(new ActionListener()
   public void actionPerformed(ActionEvent e)
      /* oCurWin is a JInternalFrame object (extended class) that tracks the
         current focussed window
      if(oCurWin.ID == 1)
        oCurWin.ID = 2;
      else if(oCurWin.ID == 2)
        oCurWin.ID = 3;
      else
        oCurWin.ID = 1;
      oCurWin.setVisible(true);
      try
     oCurWin.setSelected(true);
      catch(java.beans.PropertyVetoException e)
     System.out.println("Can select oCurWin");
});This code works fine for accelerator set as F6, and when we shift to the tree view. But sometimes on shifting focus to any of the right views, with accelerator not F6, although the right view appears to be focussed due to change in title bar color, the navigation continues in the tree view.
Thanks...
Shefali

Hi,
have you tried requesting the focus on your newly selected internal frame ?

Similar Messages

  • How to Open a Specific Folder in the Finder via Shortcut Key

    I'm sure this has been covered elsewhere, so sorry for not finding it...
    Is it possible to assign a shortcut key to open a specific folder with Automator or AppleScript? There are 4-5 commonly used folders buried 10-11 levels deep on a server and I'd love to have a shortcut key to open those particular folders in the Finder.
    Could you give me some assistance?
    Thanks!

    QuickKeys may work, or you can look on http://www.versiontracker.com or http://www.macupdate.com for other alternatives.
    Another option is to create aliases to those folders and store the aliases in a local folder which you can place on your Dock, the Finder window sidebar or toolbar.

  • In the new Pages 5.0, what is the page break shortcut key. I cannot find the key as indicated on the drop down menu.

    in the new Pages 5.0, what is the page break shortcut key (it used to be the Fn + enter). I cannot find the (new) key as indicated on the drop down menu. Please help.

    Hi Bruce and fruhulda,
    ok, I found the keyboard viewer, it only shows the traditional symbol 'return'.  something like a sideway u-turn continued with the arrow under.  This is the Canadian or US keyboard. 
    btw thanks for your suggestion.

  • What is the shortcut key to highlight words in adobe reader in macbook pro

    what is the shortcut key to highlight words in adobe reader in macbook pro?
    Shift + U is not working
    how can i change shortcut key?

    I don't believe there is a keyboard shortcut available for that feature. But I believe if you click-select the topmost chapter, and Shift-click the bottommost chapter, it should select them all.
    Other shortcuts for books can be set up in Edit > Keyboard Shortcuts in the Panel Menus product area. There are no default shortcuts in that area.

  • Satellite U400-12P - Multimedia Shortcut Keys illuminates 24-7

    Hey everyone,
    I am new to this forum and I hope someone will solve the problem I have.
    I own a Toshiba Satellite U400-12P (been a year now). Past few days I have noticed that the multimedia keys (PLAY/PAUSE/FFD/RWD/) isn't functiong (doesnt respond to my touch) + multimedia keys illuminates 24-7;that is even if the computer is switched off the shortcut keys are shining brightly. I have no clue why this is taking place.
    If someone has a solution to this. I shall greatly appreciate it.
    Thanx

    Hi every body,
    Lately, am trying to light the multimedia keys, which i used to do it by touching the mute key,
    but unfortunately the keys and even the word satellite and the light over the mouse are not lightning even though the ,mutimedia keys are working normally,
    would you please support me how to light these keys again?
    Thanks.

  • How to grab global shortcuts keys in a java application?

    Hi!
    Does anybody know if it's possible to get the focus to a Java application, when it is not selected, using a keyboard shortcut key?
    I've written a java application that provides shortcuts keys (like CTRL-M...) for accessing to some operations. For using those keys combinations my application has to be focused between the other opened applications on the operating system (Linux 7.3), as it should be in a normal behaviour... but, I would need that the operation associated to the shortcut key could be executed even if another application had the focus...
    Is it possible? How this could be done?
    Thanks in advance four your interest and your answers.

    Unfortunately shortcuts will work only if your app is focused.
    Denis

  • Is there a way to create a custom shortcut key to paste my email address?  I would like to be able to press a key combination that will paste whatever I set it to, i.e. my email address.

    Is there a way to create a custom shortcut key to paste my email address?  I would like to be able to press a key combination that will paste whatever I set it to, i.e. my email address.

    There are multiple ways to do similar things. One, built into the system, is to use text replacement. See:
    http://www.tuaw.com/2009/12/31/mac-101-making-text-replacement-work/
    There are other programs you can buy that can do the job in different ways, such as TextExpander. You could also just create a clipping file by dragging your e-mail address to somewhere like the desktop, and then you can simply drag that file to wherever you like to insert your e-mail address there.

  • Is there a way to open a second firefox instance using a shortcut key (i.e. Ctrl + Alt + 9), while a first instance is already running?

    This happens both in Windows XP and Windows 7. Firefox is the only application that does not allow this consistently (this works with MS-Word, Google Chrome, Notepad etc.).

    Yes, but {Ctrl + N} is useful only when you are already in Firefox. I meant quickly launching Firefox while using another application via a user-assigned shortcut key. For example, I am writing a text in MS-Word and I want to run a quick Wikipedia search; now, if Firefox is already running in the background, my shortcut for Firefox (e.g Ctrl + Alt + 9) won't do anything - it will only launch Firefox, if it is the first Firefox window to be opened. Thanks anyway though!

  • How can I have a shortcut key that is not a JMenuItem

    Hi,
    I'm trying to make "ctrl-f" a shortcut key in my program.
    I know I can do this as a JMenuItem by:
    menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, KeyEvent.CTRL_MASK));
    However, I would rather not have it in the menu.
    How would I do this without having it as a JMenuItem?
    Thanks,
    Daniel Lorimer

    As a user I hate designs like this. How am I supposed to know what all the shortcut keys are? Using a menu item is a form of self documentation
    Anyway, check out the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/misc/keybinding.html]How to Use Key Bindings.

  • If I would like to have all opened tabs in my browser stop loading a webpage is their a shortcut key that will allow this?

    If I open too many Bookmarked pages into tabs my browser will hang and then sometimes crash or close unexpectedly.
    If I bring up task manager or use the Alt + Tab I can navigate to the window and right-click and choose restore to allow me to see the window again. This needs to be done if I load more than 10 pages at once. Is there a way to choose to prevent loading of all opened tabs and then choose which tabs I'm currently working with to load the webpage? I would like to know how to use a shortcut key on my keyboard to select all tabs as ctrl + A does not work and then escape or another key tells to stop all pages from loading in each tab as with all the ads, gifs, videos, and internet spam keeps growing it is too much of a strain to have multiple webpages opened in tabs on the browser.
    I use Win XP SP2 and I am eagerly waiting a solution as it has been an issue with even previous versions of Firefox however IE could only have about 3 tabs opened and then would crash that is why I stick with Firefox as my browser of choice.

    Just saw your posting from yesterday - https://support.mozilla.com/en-US/questions/876195
    https://addons.mozilla.org/en-US/firefox/addon/checkplaces/ <br />
    '''Checks your bookmarks are valid and the pages still exist, checks for duplicates ...'''

  • What happened to the 'Shape Mode' shortcut keys on the Pen Tool?

    For the longest time I've used both the Shape and Pen Tools for drawing vectors in Photoshop, but with CS6 I noticed a lot of weird behaviours. The one that is really getting to me is the lack of 'Shape Mode' shortcut keys when using the Pen Tool. When on the 'Shape Tool', fo example Cirle or Rectange, you can press the Shift to change the Shape Mode to 'Add', Alt to change it to 'Subtract' or both together to get 'Intersect'. This functionality used to exist on the Pen Tool too, but in CS6 I can't seem to get it working.
    A collegue suggested to move over to Illustrator for all my Vector needs, and I know that this a good advice. However the lack of quick/integrated changing between 'Shape Modes' in either product (now) makes drawing things alot slower (for me).
    Am I missing something, or is this feature now ommited in Photoshop CS6. If it is does anyone know if its possible to script something to allow this kind of behviour in Photoshop or Illustrator?
    cheers,
    Jon

    The modifier keys "Alt|Opt", "Ctrl|Cmd" and "Shift" work differently depending on the tool being used but the individual keys seem to provide somewhat related functions.
    For example the "Shift" key tends to be a constraining key Rectangle tools are constrained to square ellipse tools to Circles. However if there is an Active selection when you hold down the skey when you drag out a new selection it does not reset the current selection instead the new selection is not constrained and is added to the current selection. Shift constrains Transform tool to current aspect ratio,  Shift constrains Line tools to vertical, horizontal or 45 degree angles. Pen tool like line tool shift constrains the angle.
    The "Alt|Opt" key changes the way tools operate. Transforms are from the center not from the side or corner being dragged.  Selection tools like the rectangle and ellipse will cause the intal drag out be from the center however it there is a Active selection dragging out a new selection will be subtracted from the current selection. This key changes the Pen tool from draw mode to anchor point adjusting.
    The "Shift" and "Alt|Opt" modifier keys can be used together to have an operation be both constrain and from the center.
    The "Ctrl|Cmd" key seems to change the way a tool works on a control anchor point.  The Pen Tool changes from Pen Draw mode to Direct Selection tool to facilitate moving the point.  Transform can be distorted a single corner point can be moved and distort the rectangle bounding box.
    These keys may have other functions I don't know about.  Photoshop has many features so many I don't know if any one person know and uses all of them. For the rest of us they seem to be Photoshop hidden secrets.

  • BUG: KEYBOARD SHORTCUT KEYS DO NOT ALWAYS ACTIVATE A SERVICE (A WORKFLOW)

    BUG: KEYBOARD SHORTCUT KEYS DO NOT ALWAYS ACTIVATE A SERVICE (A WORKFLOW)
    When you assign a keyboard shortcut to a Service (such as a Service Workflow created in Automator) using the System Preferences > Keyboard > Shortcuts, if that shortcut key combination includes the Command key, pressing that shortcut will always successfully activate the Service. No problem there.
    However, shortcut key combinations that do not include the Command key (for example, the shortcut key combo Ctrl-Shift-D) WILL NOT activate the Service in any newly opened application, until you click on the Services Menu option in that application.
    As soon as you click on the application's Services Menu, this seems to bind the shortcut key combo to the Service, and thereafter, that keyboard shortcut will activate the Service in that particular app. But if you then quit and reopen the app, you'll find the Service will once again lose its binding to the shortcut key combination and will thus fail to work again.
    This means that shortcut key combinations such as Ctrl-D, Ctrl-Shift-D, F15, Alt-F15, etc are not really viable shortcuts for Services, because they will not work in any newly-opened application until you click on the Services Menu in that application.
    This bug thus greatly limits the shortcuts that you can employ for Services, because you can only reliably use shortcut key combos that contain the Command key. This is a fault that Apple really needs to fix. This is a very old glitch: I notice it is present in Snow Leopard 10.6.8, as well as Yosemite 10.10.1.
    This bug does not apply to application shortcuts, however, or to other shortcuts in the Shortcuts Preference Pane, just to Services shortcuts (including the Mac's default Services, or any Services you make yourself using Workflows on the Automator software).
    To give some examples:
    The following keyboard shortcuts for Services WILL NOT work until you click on the Services Menu in the application you are using (and they will cease working again when you quit and reopen the app):
    Ctrl-X
    Ctrl-Shift-X
    Ctrl-Alt-X
    Ctrl-Alt-Shift-X
    Alt-X
    Alt-Shift-X
    F1, F2, F3, etc
    So until Apple fixes this bug, the above type of key combinations, that do not contain the Command key, are best avoided as shortcuts for Services. It is particularly unfortunate that function keys F1 to F19 do not work reliably, as these would make great single-key shortcuts to Services.
    However, the following sort of keyboard shortcuts for Services, all containing the Command key, once set up will always work without fail:
    Command-Alt-X
    Command-Ctrl-X
    Command-Shift-X
    Command-Ctrl-Shift-X
    Command-Alt-Ctrl-Shift-X
    Command-F1, Command-F2, Command-F3, etc
    So all the above can be reliably used as shortcuts to Services.
    Here X denotes keyboard keys such as A, B, C, 1, 2, 3, =, \, [, etc.
    Note that even for keyboard shortcuts containing the Command key, you may very occasionally need to click the Services Menu to get them to work initially in an application (notably in the System Preferences application itself). But if this is necessary, it is just required once when they are first set up, and thereafter the shortcuts containing the Command key will always work without fail.
    The above was tested on Yosemite 10.10.1, but most likely applies to other versions of OS X as well, as I believe this bug is an old one. This bug is definitely present in Snow Leopard 10.6.8, because I have observed this same fault in an old Mac I have that runs Snow Leopard.
    I have reported this bug to Apple, so hopefully they will see my report and act upon it. However, it might be an idea if others also report this problem of Services shortcuts not working property, to ensure that Apple get the message. You can report a bug to Apple via their bug feedback page here.

    Exactly where do you want to use a GO BACK "shortcut" in Bridge?  Maybe I don't even understand what you mean by Go Back.  Bridge is only a file browser, nothing more. It doesn't open, edit, manipulate or save files at all.
    Are you simply referring to going back to view a folder that you viewed before?
    Please don't take this a criticism.  As someone who will gladly pay money not to have to learn any shortcuts at all, I'm just puzzled and curious, that's all.

  • HT201181 hi, in apple MacBook Air 11.6" what is the shortcut key for print screen

    hi, in apple MacBook Air 11.6" what is the shortcut key for print screen

    To capture the entire screen to an image, use the key combination ⌘ shift 3.
    To capture a selection rectangle, ⌘ shift 4.
    To capture the frontmost window, ⌘ shift 4 and then press the space bar.
    The screen grab will appear on your Desktop. Open it in Preview or your favourite image editing software, and print in the usual manner.

  • Use Group Policy to disable user interface items and shortcut keys in IE

    Hi,
    We are creating a kiosk mode of IE with full restriction to the machines drives and other applications. For that we need to disable all the shortcuts keys like ctrl, shift, alt and combination of these keys. Can anyone help me on this. i want to done this
    through GPO. Client machines are windows 7 and we are having windows server 2008 R2 (AD server).
    Thanks,
    UdayaKumar S

    I need to disable the ctrl, Alt, and shift keys and combinations of these keys with other keys as for example, cltrl+H, Ctrl+o, ets., and most important thing is, we need to apply it only through GPO not by using any other tools/ applications.
    I'm not aware of any GPO-only methods to achieve your goal (hence my other suggestions), sorry.
    Others might comment here with their thoughts/suggestions/experiences..
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • Is there a shortcut key to execute query like in Ms sql server F5?

    Hi,
    Am trying to use isql*plus to execute queries. I find it little difficult to click the execute option in the page frequently, is there a shortcut key combination to execute the queries like in ms sql server 2005 F5?
    help is appreciated.
    thanks
    Dtrinity

    I've never seen any documentation about shortcut keys, and for the limited use I've had with isqlplus, I've never found any

Maybe you are looking for

  • How to update field values in a database table using module pool prg?

    hi how to update field values in a database table using module pool prg? we created a customized table, and we put 2 push buttons in screen painter update and display. but update is not working? data is enter into screen fields and to internal table,

  • Problem opening a Premiere cs3 project in Premiere cs4

    i recently did a clean install on a new machine with adobe premiere cs4 i attempted to open the project in adobe cs4 that i created in adobe cs 3 ( i confirmed that the project isnt corrupted as the same project plays fine on another machine that has

  • Email output of launchd job

    I've setup a job using launchd which runs daily as the root user.  (I'm backup up my files to rsync.net and have followed the instructions at http://www.rsync.net/resources/howto/mac_rsync.html) Firstly, how do I send an email of the output to an ema

  • Installing Oracle App Express 2

    Hi all, I followed the procedure steps as shown in the following link: http://www.oracle.com/technology/obe/10gr2_db_single/install/htmldbinst/htmldbinst_otn.htm#t4 to install Oracle Applicaton Express. Till I reached to the following step: @htmldbin

  • MacBook Air shuts down when idle or sleep, while on batt or power.  Brand new, bought July 2012!

    After allowing an upgrade to Lion and installing Verizon card - book shuts down every time goes to sleep.  This is a brand new air!  What can I do to find a fix?