Window Owners and Focus Losing

Hi!
I originally posted this message in the Swing forum. I haven't gotten any hits on it, yet, so if anybody can shed any light on the situation, I would very much appreciate it.
There are 5 dukes up for grabs!
Thanks,
- Adam

That's a tricky one, in part because focus goes to a
specific component within a window hierarchy.
You could create a common focus listener on your
popup, to determine if any of its components
loses focus to something that's not one of its
components. However, that doesn't really work too
well, because depending on how you've created it,
none of its components may get focus in the first
place.that also makes the code more compicated, less portable, and more difficult ot maintain, because I'd have to find someway to track which components are in that window, and they're not necessarily always the same.
>
You could also attach a mouse listener to the glass
pane of the owning frame (assuming it's a frame), and
respond to mouse clicks in that pane.that's not a bad idea for a small application, but unfortunately, it won't be practical in the application I'm working with on, because there's too much other stuff going on to start intercepting events in the glass pane.
>
I suspect that there's an easier way. You could
probably find it by looking in the source code for
JPopupMenu.Yeah, I considered that too. I only looked breifly, but I can't find any relevant code that is dealing with either window or focus events, and I'm not quite sure how it's displaying itself. I suppose the relevant code could be in the UI delegate, I haven't check there yet...
- Adam

Similar Messages

  • AWT and focusing on different windows

    Hey guys.
    I have a problem, I'm trying to set the focus a window but can't.
    I have two windows A and B.
    I also have a Events being picked up set on window A.
    So the set of events are detailed as follows.
    Window A display's and responds to events.
    When a particular event occurs it loads up a new window (WindowB) and focus is given to that window.Wasn't a problem until we realised that there was a delay between Window A being displayed and Window B being displayed, enough to cause a problem.
    So the code was changed like follows.
    WindowB.pack();
    WindowB.setVisible(true);
    WindowA.setVisible(false);When it was changed to the above, we lost the ability to pick up keyboard events, as WindowA was still the window with focus.
    I've had a look at the KeyboardFocusManager where it seems that focus can be change between components.
    However is also states for method setGlobalFocusWindow() that it can only be set if it is in the same context.
    Which it is not.
    Is it possible to set focus to the window before the window has been set visible? Is KeyboardManager the right class to look at?
    Sorry about the lack of code(It's spread in many directions and is sensitive)
    Thanks for any help in advance

    hello,
    the following link may help: http://java.sun.com/j2se/1.4.2/docs/api/java/awt/doc-files/FocusSpec.html
    wrappingduke

  • I have two pc, one with windows 7 professional and another with windows 8.1. I'm the only owner and user of both. One works with 32 bits and the other (windows 8.1) , 64 bits. Can I use acrobat standard XI in both pc's being the only usuary?

    Just in case. I have two pc's one with windows 7 professional (32 bits) and another with windows 8.1 (64 bits). Can I use, with one license, as I'm the owner and only user, acrobat standard XI?. Thank you in advance
    Francisco

    Yes, the license allows 2 installs for the owner's personal use. You can check this in the license agreement if you wish.

  • New files and folders on a Linux client mounting a Windows 2012 Server for NFS share do not inherit Owner and Group when SetGID bit set

    Problem statement
    When I mount a Windows NFS service file share using UUUA and set the Owner and Group, and set the SetGID bit on the parent folder in a hierarchy. New Files and folders inside and underneath the parent folder do not inherit the Owner and Group permissions
    of the parent.
    I am given to understand from this Microsoft KnowledgeBase article (http://support.microsoft.com/kb/951716/en-gb) the problem is due to the Windows implmentation of NFS Services not supporting the Solaris SystemV or BSD grpid "Semantics"
    However the article says the same functionality can acheived by using ACE Inheritance in conjunction with changing the Registry setting for "KeepInheritance" to enable Inheritance propagation of the Permissions by the Windows NFS Services.
    1. The Precise location of the "KeepInheritance" DWORD key appears to have "moved" in  Windows Server 2012 from a Services path to a Software path, is this documented somewhere? And after enabling it, (or creating it in the previous
    location) the feature seems non-functional. Is there a method to file a Bug with Microsoft for this Feature?
    2. All of the references on demonstrating how to set an ACE to achieve the same result "currently" either lead to broken links on Microsoft technical websites, or are not explicit they are vague or circumreferential. There are no plain Examples.
    Can an Example be provided?
    3. Is UUUA compatible with the method of setting ACE to acheive this result, or must the Linux client mount be "Mapped" using an Authentication source. And could that be with the new Flat File passwd and group files in c:\windows\system32\drivers\etc
    and is there an Example available.
    Scenario:
    Windows Server 2012 Standard
    File Server (Role)
    +- Server for NFS (Role) << -- installed
    General --
    Folder path: F:\Shares\raid-6-array
    Remote path: fs4:/raid-6-array
    Protocol: NFS
    Authentication --
    No server authentication
    +- No server authentication (AUTH_SYS)
    ++- Enable unmapped user access
    +++- Allow unmapped user access by UID/GID
    Share Permissions --
    Name: linux_nfs_client.host.edu
    Permissions: Read/Write
    Root Access: Allowed
    Encoding: ANSI
    NTFS Permissions --
    Type: Allow
    Principal: BUILTIN\Administrators
    Access: Full Control
    Applies to: This folder only
    Type: Allow
    Principal: NT AUTHORITY\SYSTEM
    Access: Full Control
    Applies to: This folder only
    -- John Willis, Facebook: John-Willis, Skype: john.willis7416

    I'm making some "major" progress on this problem.
    1. Apparently the "semantics" issue to honor SGID or grpid in NFS on the server side or the client side has been debated for some time. It also existed as of 2009 between Solaris nfs server and Linux nfs clients. The Linux community defaulted to declaring
    it a "Server" side issue to avoid "Race" conditions between simultaneous access users and the local file system daemons. The client would have to "check" for the SGID and reformulate its CREATE request to specify the Secondary group it would have to "notice"
    by which time it could have changed on the server. SUN declined to fix it.. even though there were reports it did not behave the same between nfs3 vs nfs4 daemons.. which might be because nfs4 servers have local ACL or ACE entries to process.. and a new local/nfs
    "inheritance" scheme to worry about honoring.. that could place it in conflict with remote access.. and push the responsibility "outwards" to the nfs client.. introducing a race condition, necessitating "locking" semantics.
    This article covers that discovery and no resolution - http://thr3ads.net/zfs-discuss/2009/10/569334-CR6894234-improved-sgid-directory-compatibility-with-non-Solaris-NFS-clients
    2. A much Older Microsoft Knowledge Based article had explicit examples of using Windows ACEs and Inheritance to "mitigate" the issue.. basically the nfs client "cannot" update an ACE to make it "Inheritable" [-but-] a Windows side Admin or Windows User
    [-can-] update or promote an existing ACE to "Inheritable"
    Here are the pertinent statements -
    "In Windows Services for UNIX 2.3, you can use the KeepInheritance registry value to set inheritable ACEs and to make sure that these ACEs apply to newly created files and folders on NFS shares."
    "Note About the Permissions That Are Set by NFS Clients
    The KeepInheritance option only applies ACEs that have inheritance enabled. Any permissions that are set by an NFS client will
    only apply to that file or folder, so the resulting ACEs created by an NFS client will
    not have inheritance set."
    "So
    If you want a folder's permissions to be inherited to new subfolders and files, you must set its permissions from the Windows NFS server because the permissions that are set by NFS clients only apply to the folder itself."
    http://support.microsoft.com/default.aspx?scid=kb;en-us;321049
    3. I have set up a Windows 2008r2 NFS server and mounted it with a Redhat Enteprise Linux 5 release 10 x86_64 server [Oct 31, 2013] and so far this does appear to be the case.
    4. In order to mount and then switch user to a non-root user to create subdirectories and files, I had to mount the NFS share (after enabling Anonymous AUTH_SYS mapping) this is not a good thing, but it was because I have been using UUUA - Unmapped Unix
    User Access Mapping, which makes no attempt to "map" a Unix UID/GID set by the NFS client to a Windows User account.
    To verify the Inheritance of additional ACEs on new subdirectories and files created by a non-root Unix user, on the Windows NFS server I used the right click properties, security tab context menu, then Advanced to list all the ACEs and looked at the far
    Column reflecting if it applied to [This folder only, or This folder and Subdirectories, or This folder and subdirectories and files]
    5. All new Subdirectories and files createdby the non-root user had a [Non-Inheritance] ACE created for them.
    6. I turned a [Non-Inheritance] ACE into an [Inheritance] ACE by selecting it then clicking [Edit] and using the Drop down to select [This folder, subdirs and files] then I went back to the NFS client and created more subdirs and files. Then back to the
    Windows NFS server and checked the new subdirs and folders and they did Inherit the Windows NFS server ACE! - However the UID/GID of the subdirs and folders remained unchanged, they did not reflect the new "Effective" ownership or group membership.
    7. I "believe" because I was using UUUA and working "behind" the UID/GID presentation layer for the NFS client, it did not update that presentation layer. It might do that "if" I were using a Mapping mechanism and mapped UID/GID to Windows User SIDs and
    Group SIDs. Windows 2008r2 no longer has a "simple" Mapping server, it does not accept flat text files and requires a Schema extension to Active Directory just to MAP a windows account to a UID/GID.. a lot of overhead. Windows Server 2012 accepts flat text
    files like /etc/passwd and /etc/group to perform this function and is next on my list of things to see if that will update the UID/GID based on the Windows ACE entries. Since the Local ACE take precedence "over" Inherited ACEs there could be a problem. The
    Inheritance appears to be intended [only] to retain Administrative rights over user created subdirs and files by adding an additional ACE at the time of creation.
    8. I did verify from the NFS client side in Linux that "Even though" the UID/GID seem to reflect the local non-root user should not have the ability to traverse or create new files, the "phantom" NFS Server ACEs are in place and do permit the function..
    reconciling the "view" with "reality" appears problematic, unless the User Mapping will update "effective" rights and ownership in the "view"
    -- John Willis, Facebook: John-Willis, Skype: john.willis7416

  • Will uninstalling and reinstalling iTunes on a Windows 8 laptop mean losing my Playlists?

    will uninstalling and reinstalling iTunes on a Windows 8 laptop mean losing my Playlists? Thanks

    As given above updating or reinstalling iTunes should have no adverse effects on the library and its playlists, but you ought to  backup your library anyway.
    See Troubleshooting issues with iTunes for Windows updates for additional information if the reinstall doesn't go smoothly.
    tt2

  • Changing focus - window issues and .chm

    Two questions:
    1) When choosing any mailto: or website link from a .chm, a
    new window opens, as expected, but the TOC changes to "hidden."
    When click anywhere in the Help window, the TOC shows. Going back
    and forth from the message window/website and the help file, you
    will see the behavior. Our QA flagged this as a potential issue.
    Is this the expected behavior? Or, is there a setting to
    prevent it from hiding? (I would like the Contents, Search, and
    Index tabs to show when the .chm is first opened.) However, I don't
    see the purpose of the Show/Hide being activated when changing
    focus.
    2) After opening a message window or web page from a .chm,
    the Help window remains on top of the message window/web page. The
    message window is indeed active for composing (is in focus), but it
    is often necessary to reposition the help window (which is
    annoyingly still on top of the new window) to be able to
    compose--same with being able to see the full web page.
    Again, is this expected? Is there a setting for having true
    focus -- not always having the .chm stay on top but go behind when
    you change focus to compose a message or view a web page that you
    have initiated from the .chm?
    Thank you very much for any tips you can suggest.
    -- Anne Jackson
    Sr. Technical Writer, SunGard
    Ann Arbor, MI

    Anne,
    There is a setting for a window to be "top-most." I may not
    be able to tell you how to get there in RH as I use an old version.
    In the project settings, window definitions, find
    properties/advanced/extended styles and be sure Top-most window is
    deselected.
    If you can't find it in RH, you can add 2 (hex) to the
    NavPaneStyle parameter in the window definition in your .hhp file
    John

  • Windows and Focus

    Hi,
    I have a secondary window that pops up from a main window in my program. The thing I want is to not let the user get back to the main window as long as the secondary window is open. Only when say a quit button is clicked on the secondary window, then that window closes and the user can access the main window then. Any suggestions or leads highly appreciated.

    You can get around this situation by hiding the first window as soon as you pop up the second window. Then, in the event listener for the closing button of the second window, you can make the first window visible and then close the second one.
    Both of these, ofcourse, have to be done in the portion of your code wherein you would have written action listeners.
    Hope this helps. If you still have problems, then please let me know.
    Plutaurian

  • HT1925 I am using windows XP and have iTunes version 11.0.5.5.  My iPhone 5 with current operating system will not link with my iTunes. It states I needed the newer version of iTunes. But I have been unable to update --automatic or manual. How do I update

    I am using an older windows computer with Windows XP and iTunes 11.0.5.5.  Since upgrading my iPhone and iPad my system will not allow me to connect the devices to my iTunes -- it notes I need to upgrade to iTunes 11.5.  However using automatic updates or manual update I can not update iTunes -- I get an error message the older windows iTunes could not be removed. I can not remove iTunes using control panel -- an older install/uninstall file is evidently missing. All of my music is contained on my PC -- more music is on my PC than I store on my other devices and I don't want to loose those music files nor permission to access those music files. Does anyone have a solution to uninstalling and upgrading windows iTunes without losing my music. I would like to be able to connect my iPhone and iPad to my PC again. RS

    I am haveing same problem canot find itunes.msi

  • Windows 8 and 8.1 units loosing connection to printers.

    I am having an issue with Windows 8 machines losing connection to Canon Printers. Everything is being run through our server and the issue is only affecting windows 8 and 8.1 machines. They lose connection to the printer (through the server) but the
    connection to the server is still good. In order to resolve the issue the printer has to be removed from the windows 8 unit, the windows 8 unit restarted and then reinstall the printer from the server.
     This has been a continual process and is quite a hassle to keep having to do. I was wondering if anyone has any in information on a fix. It would be a great relief.
    Again this is currently only an issue with Windows 8 and 8.1 when connecting to printers through our servers (mostly 2008 R2 with one 2003 all with current updates). Have tried using both PCL and UFRII drivers, both new and older driver versions with no
    improvements. This is affecting every one of our Canon printers models: 2880, 3880 5055, 5045, 5235, 5240, 6055. And the error message that pops up is just the generic printer unavailable/cannot connect to the printer.

    Hi,
    I consider that the issue can be caused by failing to load driver.
    Please let me know once this issue happened, try to restart the computer by clicking Settings -> Power button -> Restart.
    If we can get this issue fixed by restarting the computer, we can see that the fast boot fails to load printer drivers.
    Let’s disable this Feature in Windows 8 and 8.1 computers to check the results:
    How to Turn "Fast Startup" On or Off for a Hybrid Boot in Windows 8 and 8.1
    http://www.eightforums.com/tutorials/6320-fast-startup-turn-off-windows-8-a.html
    For your reference, you can know more about fast boot in Windows 8 and 8.1:
    How Windows 8 Hybrid Shutdown / Fast Boot feature works
    http://www.techrepublic.com/blog/windows-and-office/how-windows-8-hybrid-shutdown-fast-boot-feature-works/
    If we cannot get this issue fixed, please post back the event log and models of your Windows 8 computers and printers here for further research:
    Please upload the event log (System) into OneDrive and post back the shared link:
    How to Save Event Logs
    http://msdn.microsoft.com/en-us/library/gg163107.aspx
    Kate Li
    TechNet Community Support

  • TS1363 I have a new computor with windows 8 and have installed I Tunes but it will not reconise my old I Pods, as I don't want to lose these tunes what can I do?

    I have a new computor with Windows 8 and an old nano I Pod, I Tune does not reconise this, what can I do without losing all my music?

    How to use your iPod to move your music to a new computer 
    iPod appears in Windows but not in iTunes 

  • Windows 7 and Arch linux dual boot problem

    hey guys I had an issue with windows 7 dual booted with arch and i was just wondering my windows 7 crashed. I had Reinstalled windows OS and all my partitions are set up but now when I try to boot up arch I cant at all cause windows Boot took over and i have no way of getting into arch is there anyway i can fix this or maybe reinstall arch without loseing my home folder with all my data, or is there just and easyer way to fix this issue im stuck.  thank you all for your support as i am a noob

    You need to re-install grub. When you reinstalled Windows it will overwrite grub preventing you booting Arch. You'll need to boot from a liveCD and chroot into your Arch installation. details for recovering grub are in the wiki - https://wiki.archlinux.org/index.php/GR … stallation

  • DUAL BOOT windows 7 and linux HELP

    MASTERS
    im planing to have windows 7 and linux at the same time (DUAL BOOT)
    but i dont know if one key recovery still works after installation
    ihave lenovo g560
    i3 @ 2.53
    4gb ram
    any advice guys?

    hi botards01,
    If you're planning to use linux occasionally (Ubuntu for example) and you don't want to risk losing the One Key Recovery functionality, try to install Ubuntu via Wubi as this doesn't repartition your HDD but creates a virtual disk on your current OS.
    Check it out - Install Ubuntu in Windows With Wubi
    Hope this helps
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • Windows 8 and Premiere 11???  Please help

    Hi
    I'm on windows 8 (64 bit) and PE11.  Today I lost all my work although I had saved regularly and I have to re-render very often.  Tonight as I'm trying to re-do my day's work, I'm losing sync and entire clips keep disapearing.  It seems to be becoming increasingly unstable.  I really don't know if I'm doing something wrong or, possibly, Windows 8 and Premire Elements 11 aren't the best fit.  I've noticed a few other post mentioning Window 8 problems although they seem to differ from mine.
    The head of IT at my company wants to remove windows 8 and install windows 7 on my computer (mainly becasue of a VPN issue) but I am afraid I will lose all my work.
    Can anyone suggest a way, or a number to call, to tell me how I can save my work, rid myself of windows 8 and then re-import my work into a windows 7 enviornment?  I fear 2 weeks of my work is going up in smoke. 
    PS I posted earlier, I am also having increasing frequent crashes.
    Please Help
    Thank you

    Hi Nealeh,
    I think it is more than 'gut' feeling about Windows 8.  I had the same experience sometimes things worked, other times they didn't. Colleagues & I have problems with other programs after the Window 8 upgraded.  Infact, my VPN would not work at all with Windows 8 but works fine on W7 (luckily so I can work from home on this snowy day) 
    However,  since my last post I've had a new weird problems, although all the annimation footage that I generated in Photoshop/Premiere import just fine, I have to re-import them every day.  However the .MOV which worked perfectly on the Windows 8 platform now have the 'importer reported a generic error' in Windows 7.  According to the forums it may be a codec problem so I'm going to try re-importing them into the computer or try this codec solution I read about (although it seems very confusing)
    I didn't want to convert to Windows 7 mid project, but with all the major crashes I had no choice.  If you are mid project, maybe you can publish the project as is to use with the new platform.  I wish I had been able to do that, exspecially with the animations as they took a long time to build, and it looks like I'm going to have to start from scratch.
    Good luck with getting off Windows 8.

  • Dual boot ing pre-installed Windows 8 and windows 7?

    Hi there
    I have a lenovo G505s that came with windows 8 and would like to download windows 7 and have them dual boot for gaming purposes so I was wondering I could get any advise on the matter.

    Welcome to the forum!
    With Windows, generally you have to install the older version first then the newer with dual booting.  Since you already have Windows 8 installed that might be a problem.  Also resizing the partitions on your hard drive to make room will disable the option to use One Key Recovery at boot up.  If the machine is still under warranty, you might wait till the warranty expires before re-arranging things.  Also prior to installing Windows 7, make sure there are drivers available for your system's hardware.
    Owner & Operator of the following:
    ● Lenovo Ideapad Z570 w/ Win 7 & Win 8.1 Dual Boot ● Lenovo Yoga 3 Pro w/ Windows 8.1 ● Toshiba A75-S206 w/ Win 7
    ● IBM Thinkpad T-23 w/ Win XP ● IBM Thinkpad T-22 w/ Win XP • As well as multiple desktops dual/triple booting XP, Vista and Win 7.
    ★ Find a post helpful? Thank that member by clicking on the ☆Star☆ to the left awarding them a Kudo.
    ★ Posting a problem and a reply is helpful and it answers your question, please mark it as an "Accepted Solution"
    ★ I'm not a Lenovo employee, just a volunteer geek who likes to help folks. Enjoy your time here, pay it forward by helping others !
    ★ Sorry, I don't answer questions via Private Messages. Posting in the appropriate forum is the best way to get assistance.

  • I have Windows 7 and was wondering if there was a version of Firefox called "Nightly"? The File type of a Nightly.Ink. Also, every time I open "Nightly" now I g

    I have Windows 7 and was wondering if there was a version of Firefox called "Nightly"? The File type of a Nightly.Ink. Also, every time I open "Nightly" now I get a program update popup and it says "update.exe". Is this a part of Firefox "Nightly" or is it a virus? Please answer this so I can relax. My email is [email protected]

    There is a version of Firefox named Nightly, but most people do not have it installed. Currently:
    * Firefox 24 (released)
    * Beta (future Firefox 25, subject to some changes)
    * Aurora (future Firefox 26, subject to many changes)
    * Nightly (rapidly evolving future Firefox)
    I can't answer your detailed questions about Nightly, however, please make a backup of your profile before removing it, if you remove it, as some users have reported losing all their personal data when doing that.
    * [[Back up and restore information in Firefox profiles]]
    * [[Profiles - Where Firefox stores your bookmarks, passwords and other user data]]

Maybe you are looking for

  • Custom logging, multiple apps in one file, different from server.log

    I have several applications running on my integration server. I would like to log from these apps to a single file (different file from server.log) I tried to use custom log4j logging, but there's a problem with the RollingFileAppender. Whenever a fi

  • Video Troubles

    I just recently acquired a 60GB video iPod, and its wonderful I love it. The only problem is, i've bought a few videos and music videos of the iTunes store, but my iPod will not play the videos even after transferring them onto the iPod. When I go to

  • Java viewObject.getOrderByClause question

    I have set an ORDER BY clause in my bc4j view object. I want to replace it with a different ORDER BY clause. However, when I do retrieval of the ORDER BY clause from the view object such as: String oldOrderByClause = (String) vobj.getOrderByClause();

  • SOX Compliance in SAP

    Hi all, we are about do one project for US based company for which they are asking about SOX compliance in SAP. Can any one tell, what we have to do in SAP R/3 in order meet SOX compliance as per US regulations. Regs, Ramesh B

  • Error in configure the Help

    Hello Everybody,    i have install the ECC 6.0, Now i want to configure the SAP Help using SR13 so please suggest step by step procedure. I have tried as follows T.code   : SR13 On HtmlHelpfile tab :     Variant       SAPHELP     Platform     WN32