I'm using JDK 1.7.0_21.
I have Windows 7 configured to auto-focus on the window with the cursor over it, but NOT to auto-raise.
The auto-focus feature is enabled in Windows 7 via the Control Panel, Ease of Access: "Activate a window by hovering over it with the mouse".
The no-auto-raise feature is enabled by manually changing the Windows Registry.
There are a number of third-party tools that will make these settings for you.
While this works for all my other windows apps, this stuff isn't working correctly with NetBeans.
If the last-focused window was a NetBeans window, and I move the cursor over another window, things work as expected. The focus changes, but the window is not raised to the top.
If I move the cursor back to a NetBeans window, the focus changes to it.
This is all fine until I actually CLICK on some other window.
WHen I move the cursor back over any NetBeans window, all NetBeans windows are raised to the top.
This is an annoyance, but it's not so bad.
What is much worse is that the NetBeans window does NOT get the focus.
I understand that this may be an issue Java/Swing.
I will write a simple Swing app to see if I can reproduce the problem with that.
Please reopen if this problem is not reproducible in a plain Swing app, thanks.
I can readily reproduce the auto-focus with a very simple Swing App. A JFrame with only a title and a with a JPanel with 4 component.
The auto-raise problem, however, is a bit different. The problem is more intermittent. I create both a JFrame and a JDialog and set them both to visible. I click on another app (e.g. FF) to give it focus and to raise it, then move my cursor about randomly between the other app, the frame, and the dialog. Eventually the frame and dialog both get raised. It seems to happen ONLY if I move the cursor into BOTH the frame and the dialog. If I move the cursor only between the other app and the frame, or only between the other app and the dialog, I can't reproduce the problem.
Since this looks to be a problem with Java, I doubt I will ever see a fix. Argh!